Browse Source

Merge pull request #2016 from svaarala/configure-cleanups

Add configure.py minimal test, update RELEASES for configure.py fix
pull/2020/head
Sami Vaarala 6 years ago
committed by GitHub
parent
commit
b062b50ab1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .travis.yml
  2. 7
      Makefile
  3. 4
      RELEASES.rst
  4. 31
      tests/configure/test_minimal.sh

1
.travis.yml

@ -16,4 +16,5 @@ script:
- make tidy-site - make tidy-site
- make apitest - make apitest
- make ecmatest - make ecmatest
- make configuretest
- make errorinjecttest - make errorinjecttest

7
Makefile

@ -634,7 +634,7 @@ test: apitest ecmatest
# Set of miscellaneous tests for release. # Set of miscellaneous tests for release.
.PHONY: releasetest .PHONY: releasetest
releasetest: xmldoctest closuretest bluebirdtest luajstest jsinterpretertest lodashtest underscoretest emscriptenluatest emscriptenduktest emscripteninceptiontest emscriptenmandeltest emscriptentest errorinjecttest releasetest: configuretest xmldoctest closuretest bluebirdtest luajstest jsinterpretertest lodashtest underscoretest emscriptenluatest emscriptenduktest emscripteninceptiontest emscriptenmandeltest emscriptentest errorinjecttest
@echo "" @echo ""
@echo "### Release tests successful!" # These tests now have output checks. @echo "### Release tests successful!" # These tests now have output checks.
@ -661,6 +661,11 @@ apitest: apiprep
@echo "### apitest" @echo "### apitest"
"$(NODE)" runtests/runtests.js $(RUNTESTSOPTS) --num-threads 1 --log-file=/tmp/duk-api-test.log tests/api/ "$(NODE)" runtests/runtests.js $(RUNTESTSOPTS) --num-threads 1 --log-file=/tmp/duk-api-test.log tests/api/
# Configure.py test.
configuretest:
@echo "### configuretest"
bash tests/configure/test_minimal.sh
# Dukweb.js test. # Dukweb.js test.
.PHONY: dukwebtest .PHONY: dukwebtest
dukwebtest: dukweb.js jquery-1.11.2.js dukwebtest: dukweb.js jquery-1.11.2.js

4
RELEASES.rst

@ -3408,6 +3408,10 @@ Planned
* Fix compile error (missing DUK_DCERROR_UNSUPPORTED macro) when compiling * Fix compile error (missing DUK_DCERROR_UNSUPPORTED macro) when compiling
with RegExp support disabled (GH-1990, GH-1991) with RegExp support disabled (GH-1990, GH-1991)
* Fix configure.py -D option to accept parenthesized macros, e.g.
'-DFOO(bar)=quux', which were used in some examples but were not
actually functional (GH-2013, GH-2014)
* Trivial fixes and cleanups: Windows Date provider return code check * Trivial fixes and cleanups: Windows Date provider return code check
consistency (GH-1956) consistency (GH-1956)

31
tests/configure/test_minimal.sh

@ -0,0 +1,31 @@
#!/bin/sh
#
# Minimal test coverage for configure.py.
#
set -e
reinit() {
if [ ! -d /tmp ]; then
echo "This script expects /tmp to exist"
exit 1
fi
rm -rf /tmp/duk-configure-test
mkdir /tmp/duk-configure-test
}
# Test for command line -D with macro arguments, GH-2013 / GH-2014.
reinit
python tools/configure.py \
'-DDUK_USE_DEBUG_WRITE(level,file,line,func,msg)=do {fprintf(stderr, "D%ld %s:%ld (%s): %s\n", (long) (level), (file), (long) (line), (func), (msg));} while(0)' \
--output-directory /tmp/duk-configure-test
#grep DUK_USE_DEBUG_WRITE /tmp/duk-configure-test/duk_config.h
#grep DUK_USE_DEBUG_WRITE /tmp/duk-configure-test/duk_config.h | md5sum
LINE=`grep DUK_USE_DEBUG_WRITE /tmp/duk-configure-test/duk_config.h`
if [ "$LINE" != "#define DUK_USE_DEBUG_WRITE(level,file,line,func,msg) do {fprintf(stderr, \"D%ld %s:%ld (%s): %s\n\", (long) (level), (file), (long) (line), (func), (msg));} while(0)" ]; then
echo "DUK_USE_DEBUG_WRITE not found in duk_config.h in expected form"
echo $LINE
fi
echo "Done."
Loading…
Cancel
Save