File tree Expand file tree Collapse file tree 2 files changed +27
-41
lines changed Expand file tree Collapse file tree 2 files changed +27
-41
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,17 @@ do_steps: &do_steps
32
32
33
33
# we clone a fork of bake
34
34
cd "$HOME" && git clone -b ${BAKE_BRANCH} git://github.com/nsnam/bake-git ./bake
35
+
36
+ # setup environment
37
+ OS=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
38
+ if [[ $OS = "\"Ubuntu\"" ]] ; then
39
+ sudo apt-get update; sudo apt-get install -y python-pip python3-pip ;
40
+ elif [[ $OS = "Fedora" ]] ; then
41
+ sudo yum -y update ; sudo yum install -y python-pip python3-pip;
42
+ fi
43
+
44
+ sudo pip install distro requests; sudo pip3 install distro requests
45
+
35
46
cd "$HOME" && ./bake/bake.py configure -e dce-umip-${BAKE_MOD_VERSION} -e dce-linux-${BAKE_MOD_VERSION}
36
47
cd "$HOME" && ./bake/bake.py download -vvv
37
48
@@ -77,64 +88,30 @@ do_steps: &do_steps
77
88
path : ~/junit
78
89
- store_artifacts :
79
90
path : ~/junit
91
+ - store_artifacts :
80
92
path : ~/testpy-output
81
93
82
94
# # Customize the test machine
83
95
jobs :
84
- ubuntu14.04 :
85
- docker :
86
- - image : ns3dce/ubuntu14.04:0.1
87
- environment :
88
- << : *do_steps
89
-
90
96
ubuntu16.04 :
91
97
docker :
92
98
- image : ns3dce/ubuntu16.04:0.1
93
99
environment :
94
100
<< : *do_steps
95
101
96
- ubuntu17.04 :
97
- docker :
98
- - image : ns3dce/ubuntu17.04:0.1
99
- environment :
100
- << : *do_steps
101
-
102
- fedora26 :
103
- docker :
104
- - image : ns3dce/fedora26:0.1
105
- environment :
106
- << : *do_steps
107
-
108
- fedora27 :
109
- docker :
110
- - image : ns3dce/fedora27:0.1
111
- environment :
112
- << : *do_steps
113
-
114
- # not yet released (171228)
115
- fedora28 :
116
- docker :
117
- - image : ns3dce/fedora28:0.1
118
- environment :
119
- << : *do_steps
120
-
121
102
122
103
workflows :
123
104
version : 2
124
105
build :
125
106
jobs :
126
- - ubuntu14.04
127
107
- ubuntu16.04
128
- - ubuntu17.04
129
- - fedora26
130
- - fedora27
131
108
nightly_workflow :
132
109
triggers :
133
110
- schedule :
134
111
cron : " 0 1 * * *" # run at 1am UTC
135
112
filters :
136
113
branches :
137
114
only :
138
- - fix-valgrind-test
115
+ - fix-valgrind-test
139
116
jobs :
140
- - ubuntu14.04_valgrind
117
+ - ubuntu14.04_valgrind
Original file line number Diff line number Diff line change 1
- #! /usr/bin/env python
1
+ #! /usr/bin/env python3
2
2
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
3
3
#
4
4
# Copyright (c) 2009 University of Washington
@@ -552,7 +552,18 @@ def sigint_hook(signal, frame):
552
552
# and use that result.
553
553
#
554
554
def read_waf_config ():
555
- for line in open (".lock-waf_" + sys .platform + "_build" , "rt" ):
555
+ f = None
556
+ try :
557
+ # sys.platform reports linux2 for python2 and linux for python3
558
+ f = open (".lock-waf_" + sys .platform + "_build" , "rt" )
559
+ except FileNotFoundError :
560
+ try :
561
+ f = open (".lock-waf_linux2_build" , "rt" )
562
+ except FileNotFoundError :
563
+ print ('The .lock-waf ... directory was not found. You must do waf build before running test.py.' , file = sys .stderr )
564
+ sys .exit (2 )
565
+
566
+ for line in f :
556
567
if line .startswith ("top_dir =" ):
557
568
key , val = line .split ('=' )
558
569
top_dir = eval (val .strip ())
@@ -651,9 +662,7 @@ def make_paths():
651
662
else :
652
663
if not have_LD_LIBRARY_PATH :
653
664
os .environ ["LD_LIBRARY_PATH" ] = ""
654
- print ("%r" % NS3_MODULE_PATH )
655
665
for path in NS3_MODULE_PATH :
656
- print ("%r" , path )
657
666
os .environ ["LD_LIBRARY_PATH" ] += ":" + path
658
667
os .environ ["LD_LIBRARY_PATH" ] += ":" + dce_ldlibpath
659
668
if options .verbose :
You can’t perform that action at this time.
0 commit comments