Sync with 5.1.0
[deliverable/titan.core.git] / regression_test / prereq.pl
1 #!/usr/bin/perl -wT
2 ###############################################################################
3 # Copyright (c) 2000-2014 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
10 use strict;
11 # No use warnings; in 5.005 but we have the -w flag
12
13 if ($] < 5.006) {
14 # ancient perl, we must be on Solaris :(
15 my @perlloc = qw( /proj/TTCN/Tools/perl-5.10.1/bin/perl /mnt/TTCN/Tools/perl-5.10.1/bin/perl );
16 foreach (@perlloc) {
17 if (-x $_) {
18 warn "Let's try with $_ instead";
19 exec( $_, '-wT', $0, @ARGV ) or die "That didn't work either: $!";
20 }
21 }
22 }
23 else {
24 require Test::More;
25 Test::More->import(tests => 2 + 3);
26 }
27
28 my $level = shift @ARGV || 0;
29
30 ok( exists $ENV{TTCN3_LICENSE_FILE}, 'TTCN3_LICENSE_FILE defined' );
31 ok( -f $ENV{TTCN3_LICENSE_FILE}, "TTCN3_LICENSE_FILE ($ENV{TTCN3_LICENSE_FILE}) exists" );
32
33 SKIP: {
34 skip('Running directly; no info about our parent', 3) if $level < 1;
35
36 is($ENV{CXX} , $ENV{BASE_CXX} , 'CXX is the same');
37 is($ENV{XMLDIR} , $ENV{BASE_XML} , 'XMLDIR is the same');
38 is($ENV{OPENSSL_DIR}, $ENV{BASE_OPENSSL}, 'OPENSSL_DIR is the same');
39 }
40
This page took 0.031832 seconds and 5 git commands to generate.