File: run_tests07.pl

package info (click to toggle)
openmpi 5.0.8-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,684 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (93 lines) | stat: -rwxr-xr-x 3,868 bytes parent folder | download | duplicates (42)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/env perl
#
# Copyright (c) 2019-2020 Intel, Inc.  All rights reserved.
#
# Copyright (c) 2019      Cisco Systems, Inc.  All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow

use strict;

my @tests = ("-n 4 --ns-dist 3:1 --fence \"[db | 0:0-2;1:0]\"",
             "-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:0]\"",
             "-n 4 --ns-dist 3:1 --fence \"[db | 0:;1:]\"",
             "-n 4 --ns-dist 3:1 --fence \"[0:]\"",
             "-n 4 --ns-dist 3:1 --fence \"[b | 0:]\"",
             "-n 4 --ns-dist 3:1 --fence \"[d | 0:]\" --noise \"[0:0,1]\"",
             "-n 4 --job-fence -c",
             "-n 4 --job-fence",
             "-n 2 --test-publish",
             "-n 2 --test-spawn",
             "-n 2 --test-connect",
             "-n 5 --test-resolve-peers --ns-dist \"1:2:2\"",
             "-n 5 --test-replace 100:0,1,10,50,99",
             "-n 5 --test-internal 10",
             "-s 1 -n 2 --job-fence",
             "-s 1 -n 2 --job-fence -c");
#             "-s 2 -n 2 --job-fence",
#            "-s 2 -n 2 --job-fence -c");

my $test;
my $cmd;
my $output;
my $status = 0;
my $testnum;
my $timeout_cmd = "";

# We are running tests against the build tree (vs. the installation
# tree).  Autogen gives us a full list of all possible component
# directories in PMIX_COMPONENT_LIBRARY_PATHS.  Iterate through each
# of those directories: 1) to see if there is actually a component
# built in there, and 2) to turn it into an absolute path name.  Then
# put the new list in the "mca_bast_component_path" MCA parameter env
# variable so that the MCA base knows where to find all the
# components.
my @myfullpaths;
my $mybuilddir = "/home/ec2-user/workspace/open-mpi.dist.create-tarball/ompi/3rd-party/openpmix";
my $mypathstr = "src/mca/bfrops/v12:src/mca/bfrops/v20:src/mca/bfrops/v21:src/mca/bfrops/v3:src/mca/bfrops/v4:src/mca/bfrops/v41:src/mca/gds/hash:src/mca/gds/shmem2:src/mca/pcompress/zlib:src/mca/pcompress/zlibng:src/mca/pdl/pdlopen:src/mca/pdl/plibltdl:src/mca/pif/bsdx_ipv4:src/mca/pif/bsdx_ipv6:src/mca/pif/linux_ipv6:src/mca/pif/posix_ipv4:src/mca/pinstalldirs/config:src/mca/pinstalldirs/env:src/mca/plog/default:src/mca/plog/stdfd:src/mca/plog/syslog:src/mca/pmdl/ompi:src/mca/preg/compress:src/mca/preg/native:src/mca/preg/raw:src/mca/psec/dummy_handshake:src/mca/psec/munge:src/mca/psec/native:src/mca/psec/none:src/mca/psensor/file:src/mca/psensor/heartbeat:src/mca/psquash/flex128:src/mca/psquash/native:src/mca/pstat/linux:src/mca/pstat/test:src/mca/ptl/client:src/mca/ptl/server:src/mca/ptl/tool";
my @splitstr = split(':', $mypathstr);
foreach my $path (@splitstr) {
    # Note that the component is actually built in the ".libs"
    # subdirectory.  If the component wasn't built, that subdirectory
    # will not exist, so don't save it.
    my $fullpath = $mybuilddir . "/" . $path . "/.libs";
    push(@myfullpaths, $fullpath)
        if (-d $fullpath);
}
my $mymcapaths = join(":", @myfullpaths);
$ENV{'PMIX_MCA_mca_base_component_path'} = $mymcapaths;

my $wdir = $mybuilddir . "/test";
chdir $wdir;

$testnum = $0;
$testnum =~ s/.pl//;
$testnum = substr($testnum, -2);
$test = @tests[$testnum];

# find the timeout or gtimeout cmd so we can timeout the
# test if it hangs
my @paths = split(/:/, $ENV{PATH});
foreach my $p (@paths) {
    my $fullpath = $p . "/" . "gtimeout";
    if ((-e $fullpath) && (-f $fullpath)) {
        $timeout_cmd = $fullpath . " --preserve-status -k 500 450 ";
        last;
    } else {
        my $fullpath = $p . "/" . "timeout";
        if ((-e $fullpath) && (-f $fullpath)) {
            $timeout_cmd = $fullpath . " --preserve-status -k 500 450 ";
            last;
        }
    }
}

$cmd = $timeout_cmd . " ./pmix_test " . $test . " 2>&1";
print $cmd . "\n";
$output = `$cmd`;
print $output . "\n";
print "CODE $?\n";
$status = "$?";

exit($status >> 8);