Skip to content

Commit

Permalink
mk: Pass the name of the make command to maketest.py
Browse files Browse the repository at this point in the history
This should make BSD use the proper GNU make.
  • Loading branch information
brson authored and alexcrichton committed Apr 6, 2014
1 parent a6173e1 commit 0e85e59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions mk/tests.mk
Expand Up @@ -904,6 +904,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
@rm -rf $(3)/test/run-make/$$*
@mkdir -p $(3)/test/run-make/$$*
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
$$(MAKE) \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
$(3)/test/run-make/$$* \
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
Expand Down
15 changes: 8 additions & 7 deletions src/etc/maketest.py
Expand Up @@ -17,20 +17,21 @@
print 'ignoring make tests on windows'
sys.exit(0)

os.putenv('RUSTC', os.path.abspath(sys.argv[2]))
os.putenv('TMPDIR', os.path.abspath(sys.argv[3]))
os.putenv('CC', sys.argv[4])
os.putenv('RUSTDOC', os.path.abspath(sys.argv[5]))
filt = sys.argv[6]
ldpath = sys.argv[7]
make = sys.argv[2]
os.putenv('RUSTC', os.path.abspath(sys.argv[3]))
os.putenv('TMPDIR', os.path.abspath(sys.argv[4]))
os.putenv('CC', sys.argv[5])
os.putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
filt = sys.argv[7]
ldpath = sys.argv[8]
if ldpath != '':
os.putenv(ldpath.split('=')[0], ldpath.split('=')[1])

if not filt in sys.argv[1]:
sys.exit(0)
print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1])))

proc = subprocess.Popen(['make', '-C', sys.argv[1]],
proc = subprocess.Popen([make, '-C', sys.argv[1]],
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
out, err = proc.communicate()
Expand Down

0 comments on commit 0e85e59

Please sign in to comment.