Permalink
Browse files

On release, run spec tests after the binary is built.

That is, run it against the binary built from the actual tarball.

This caught the problem with 'osh help' moving to _devbuild, also fixed
in this commit.
  • Loading branch information...
Andy Chu
Andy Chu committed Feb 26, 2018
1 parent 51ffcd4 commit 3fdaa2e0266f1c9e00ed78456480348beebc302e
Showing with 17 additions and 6 deletions.
  1. +3 −2 build/test.sh
  2. +1 −1 core/builtin.py
  3. +12 −2 scripts/release.sh
  4. +1 −1 test/spec.sh
View
@@ -45,8 +45,9 @@ _tarball() {
# Build the fast one for a test.
# TODO: Maybe edit the Makefile to change the top target.
time make _bin/${name}.ovm-dbg
_bin/${name}.ovm-dbg --version
local bin=_bin/${name}.ovm # not dbg
time make $bin
$bin --version
}
hello-tar() {
View
@@ -1225,7 +1225,7 @@ def Help(argv, loader):
return 1
else:
try:
f = loader.open('_build/osh-quick-ref/%s' % section_id)
f = loader.open('_devbuild/osh-quick-ref/%s' % section_id)
except IOError as e:
util.error(str(e))
raise AssertionError('Should have found %r' % section_id)
View
@@ -90,6 +90,15 @@ remove-files() {
_tmp/oil-tar-test
}
# Run the spec tests with the binary we built out of the tarball. This can
# catch errors with embedded data, etc.
spec-tests-with-tar-build() {
local bin_dir=_tmp/oil-tar-test/oil-$OIL_VERSION/_bin
ln -s -f --no-target-directory -v oil.ovm "$bin_dir/osh"
OSH_OVM="$bin_dir/osh" test/spec.sh all
}
build-and-test() {
remove-files
rm -f -v _bin/oil.* *.so
@@ -107,18 +116,19 @@ build-and-test() {
make clean
make
# Make sure
test/spec.sh smoke
test/spec.sh link-busybox-ash # in case we deleted _tmp
test/spec.sh all
#test/spec.sh all
# Build the oil tar
$0 oil
# Test the oil tar
build/test.sh oil-tar
spec-tests-with-tar-build
# NOTE: Need test/alpine.sh download;extract;setup-dns,add-oil-build-deps, etc.
# TODO: Factor out test/alpine.sh to test/chroot.sh
View
@@ -16,7 +16,7 @@ readonly BUSYBOX_ASH=_tmp/shells/ash
readonly OSH_PYTHON=${OSH_PYTHON:-bin/osh}
readonly OSH_OVM=${OSH_OVM:-_bin/osh}
if test -f $OSH_OVM; then
if test -e $OSH_OVM; then
# TODO: Does it make sense to copy the binary to an unrelated to directory,
# like /tmp? /tmp/{oil.ovm,osh}.

0 comments on commit 3fdaa2e

Please sign in to comment.