Skip to content

Commit f637ed5

Browse files
committed
Merge pull request #89 from WebAssembly/more-travis
Start to add testing in travis
2 parents 88fed02 + dbc1be8 commit f637ed5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ matrix:
1414
packages: ['cmake', 'clang-3.7']
1515
compiler: clang
1616
env: COMPILER_VERSION=3.7
17-
# TODO: add before_script: update.py
17+
#before_script:
18+
# - python update.py
1819
script:
1920
- export CC="${CC}-${COMPILER_VERSION}"
2021
- export CXX="${CXX}-${COMPILER_VERSION}"
2122
- cmake .
2223
- make -j2
23-
# TODO: add testing.
24+
- python check.py

check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def fix(x):
275275

276276
print '\n[ checking example testcases... ]\n'
277277

278-
subprocess.check_call(['g++', '-std=c++11', os.path.join('test', 'example', 'find_div0s.cpp'), '-Isrc', '-g', '-lsupport', '-Llib/.'])
278+
subprocess.check_call([os.environ.get('CXX') or 'g++', '-std=c++11', os.path.join('test', 'example', 'find_div0s.cpp'), '-Isrc', '-g', '-lsupport', '-Llib/.'])
279279
actual = subprocess.Popen(['./a.out'], stdout=subprocess.PIPE).communicate()[0]
280280
expected = open(os.path.join('test', 'example', 'find_div0s.txt')).read()
281281
if actual != expected:

0 commit comments

Comments
 (0)