incorrect syntax fixed
[deliverable/titan.core.git] / regression_test / prereq.pl
1 #!/usr/bin/perl -wT
2 ###############################################################################
3 # Copyright (c) 2000-2016 Ericsson Telecom AB
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Eclipse Public License v1.0
6 # which accompanies this distribution, and is available at
7 # http://www.eclipse.org/legal/epl-v10.html
8 #
9 # Contributors:
10 # Balasko, Jeno
11 # Raduly, Csaba
12 #
13 ###############################################################################
14
15 use strict;
16 # No use warnings; in 5.005 but we have the -w flag
17
18 if ($] < 5.006) {
19 # ancient perl, we must be on Solaris :(
20 my @perlloc = qw( /proj/TTCN/Tools/perl-5.10.1/bin/perl /mnt/TTCN/Tools/perl-5.10.1/bin/perl );
21 foreach (@perlloc) {
22 if (-x $_) {
23 warn "Let's try with $_ instead";
24 exec( $_, '-wT', $0, @ARGV ) or die "That didn't work either: $!";
25 }
26 }
27 }
28 else {
29 require Test::More;
30 Test::More->import(tests => 2 + 3);
31 }
32
33 my $level = shift @ARGV || 0;
34
35 ok( exists $ENV{TTCN3_LICENSE_FILE}, 'TTCN3_LICENSE_FILE defined' );
36 ok( -f $ENV{TTCN3_LICENSE_FILE}, "TTCN3_LICENSE_FILE ($ENV{TTCN3_LICENSE_FILE}) exists" );
37
38 SKIP: {
39 skip('Running directly; no info about our parent', 3) if $level < 1;
40
41 is($ENV{CXX} , $ENV{BASE_CXX} , 'CXX is the same');
42 is($ENV{XMLDIR} , $ENV{BASE_XML} , 'XMLDIR is the same');
43 is($ENV{OPENSSL_DIR}, $ENV{BASE_OPENSSL}, 'OPENSSL_DIR is the same');
44 }
45
This page took 0.043849 seconds and 5 git commands to generate.