mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
#249: add 'test-desert-island', to assert that a tahoe-deps.tar.gz -enabled build does not download anything
This commit is contained in:
parent
fd432b43bf
commit
1853020a5f
12
Makefile
12
Makefile
@ -245,6 +245,18 @@ clean:
|
|||||||
find-trailing-spaces:
|
find-trailing-spaces:
|
||||||
$(PYTHON) misc/find-trailing-spaces.py -r src
|
$(PYTHON) misc/find-trailing-spaces.py -r src
|
||||||
|
|
||||||
|
# The test-desert-island target grabs the tahoe-deps tarball, unpacks it,
|
||||||
|
# does a build, then asserts that the build did not try to download anything
|
||||||
|
# as it ran. Invoke this on a new tree, or after a 'clean', to make sure the
|
||||||
|
# support/lib/ directory is gone.
|
||||||
|
|
||||||
|
test-desert-island:
|
||||||
|
wget http://allmydata.org/source/tahoe/tarballs/tahoe-deps.tar.gz
|
||||||
|
tar xf tahoe-deps.tar.gz
|
||||||
|
$(MAKE) 2>&1 | tee make.out
|
||||||
|
$(PYTHON) misc/check-build.py make.out no-downloads
|
||||||
|
|
||||||
|
|
||||||
# TARBALL GENERATION
|
# TARBALL GENERATION
|
||||||
.PHONY: tarballs upload-tarballs
|
.PHONY: tarballs upload-tarballs
|
||||||
tarballs:
|
tarballs:
|
||||||
|
22
misc/check-build.py
Normal file
22
misc/check-build.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#! /usr/bin/env python
|
||||||
|
|
||||||
|
# This helper script is used with the 'test-desert-island' Makefile target.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
good = True
|
||||||
|
build_out = sys.argv[1]
|
||||||
|
mode = sys.argv[2]
|
||||||
|
|
||||||
|
for line in open(build_out, "r"):
|
||||||
|
if mode == "no-downloads" and "downloading" in line.lower():
|
||||||
|
print line,
|
||||||
|
good = False
|
||||||
|
if good:
|
||||||
|
if mode == "no-downloads":
|
||||||
|
print "Good: build did not try to download any files"
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
if mode == "no-downloads":
|
||||||
|
print "Failed: build tried to download files"
|
||||||
|
sys.exit(1)
|
Loading…
Reference in New Issue
Block a user