Skip to content

Commit c48e5ee

Browse files
committed
Merge remote-tracking branch 'upstream/master' into glibc-build
2 parents b3ff48a + c0afe69 commit c48e5ee

File tree

2 files changed

+27
-41
lines changed

2 files changed

+27
-41
lines changed

.circleci/config.yml

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ do_steps: &do_steps
3232
3333
# we clone a fork of bake
3434
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+
3546
cd "$HOME" && ./bake/bake.py configure -e dce-umip-${BAKE_MOD_VERSION} -e dce-linux-${BAKE_MOD_VERSION}
3647
cd "$HOME" && ./bake/bake.py download -vvv
3748
@@ -77,64 +88,30 @@ do_steps: &do_steps
7788
path: ~/junit
7889
- store_artifacts:
7990
path: ~/junit
91+
- store_artifacts:
8092
path: ~/testpy-output
8193

8294
## Customize the test machine
8395
jobs:
84-
ubuntu14.04:
85-
docker:
86-
- image: ns3dce/ubuntu14.04:0.1
87-
environment:
88-
<<: *do_steps
89-
9096
ubuntu16.04:
9197
docker:
9298
- image: ns3dce/ubuntu16.04:0.1
9399
environment:
94100
<<: *do_steps
95101

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-
121102

122103
workflows:
123104
version: 2
124105
build:
125106
jobs:
126-
- ubuntu14.04
127107
- ubuntu16.04
128-
- ubuntu17.04
129-
- fedora26
130-
- fedora27
131108
nightly_workflow:
132109
triggers:
133110
- schedule:
134111
cron: "0 1 * * *" # run at 1am UTC
135112
filters:
136113
branches:
137114
only:
138-
- fix-valgrind-test
115+
- fix-valgrind-test
139116
jobs:
140-
- ubuntu14.04_valgrind
117+
- ubuntu14.04_valgrind

test.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/env python
1+
#! /usr/bin/env python3
22
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
33
#
44
# Copyright (c) 2009 University of Washington
@@ -552,7 +552,18 @@ def sigint_hook(signal, frame):
552552
# and use that result.
553553
#
554554
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:
556567
if line.startswith("top_dir ="):
557568
key, val = line.split('=')
558569
top_dir = eval(val.strip())
@@ -651,9 +662,7 @@ def make_paths():
651662
else:
652663
if not have_LD_LIBRARY_PATH:
653664
os.environ["LD_LIBRARY_PATH"] = ""
654-
print("%r" % NS3_MODULE_PATH)
655665
for path in NS3_MODULE_PATH:
656-
print("%r", path)
657666
os.environ["LD_LIBRARY_PATH"] += ":" + path
658667
os.environ["LD_LIBRARY_PATH"] += ":" + dce_ldlibpath
659668
if options.verbose:

0 commit comments

Comments
 (0)