Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-10-16 22:33:04 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-10-16 22:36:13 -0400
commitfba0f0df355cf4395d67972bbdc70579703cb57c (patch)
tree394a28485bcb053f2ce1395c179999a28c309a26
parenta4c8c0d8403c09b9bc2badd268c25b837704aef1 (diff)
downloadtame-fba0f0df355cf4395d67972bbdc70579703cb57c.tar.gz
tame-fba0f0df355cf4395d67972bbdc70579703cb57c.tar.bz2
tame-fba0f0df355cf4395d67972bbdc70579703cb57c.zip
Run YAML test cases against stripped executablev3.3.5
This significantly improves speed and reduces memory usage when dealing with hundreds of test cases. * build-aux/Makefile.am (dest_standalone_strip): New variable. (strip, %.strip.js: New targets. (.PHONY): Add strip target. (check-am): Depend on strip. * build-aux/progtest-runner: Use stripped executables.
-rw-r--r--build-aux/Makefile.am13
-rwxr-xr-xbuild-aux/progtest-runner3
2 files changed, 13 insertions, 3 deletions
diff --git a/build-aux/Makefile.am b/build-aux/Makefile.am
index 26392f8..ead04d1 100644
--- a/build-aux/Makefile.am
+++ b/build-aux/Makefile.am
@@ -22,6 +22,7 @@ path_rates := $(path_suppliers)/rates
path_map := map
path_c1map := $(path_map)/c1
path_dsl := rater
+path_tame := $(path_dsl)/tame
path_ui := ui
path_tests := test
path_suppliers := suppliers
@@ -42,6 +43,10 @@ dest_standalone := $(patsubst \
$(path_suppliers)/%.xml, \
$(path_suppliers)/%.js, \
$(src_suppliers))
+dest_standalone_strip := $(patsubst \
+ $(path_suppliers)/%.js, \
+ $(path_suppliers)/%.strip.js, \
+ $(dest_standalone))
dest_map := $(patsubst \
$(path_map)/%.xml, \
$(path_map)/%.xmle, \
@@ -61,7 +66,7 @@ ant = @ANT@ -e
.PHONY: FORCE default program-data-copy lvroot program-ui-immediate test \
default clean interp-rate-tables summary-html c1map standalones \
- program-ui version FORCE
+ strip program-ui version FORCE
default: program-ui c1map FORCE
@@ -91,10 +96,14 @@ summary-html: $(dest_summary_html) ;
$(TAME) summary $*.xmle $@
standalones: $(dest_standalone)
+strip: $(dest_standalone_strip) ui/package.strip.js
%.xmle: %.xmlo
$(TAME) link $< $@
%.js: %.xmle
$(TAME) standalone $< $@
+%.strip.js: %.js
+ cp $< $@
+ $(path_tame)/tools/strip $@
# C1 XML (specific recipes are in suppliers.mk)
c1map: $(dest_c1map)
@@ -239,7 +248,7 @@ intralov-root: summary-html
ln -fL $(path_suppliers)/*.{html,js} "$(path_intralov_root)/suppliers"
test: check
-check-am: standalones ui/package.js
+check-am: strip
@$(path_dsl)/build-aux/progtest-runner $(path_suppliers) $(path_tests)
@$(path_dsl)/build-aux/progtest-runner ui/package.xml $(path_tests)/ui
diff --git a/build-aux/progtest-runner b/build-aux/progtest-runner
index 306cddc..5fb8a27 100755
--- a/build-aux/progtest-runner
+++ b/build-aux/progtest-runner
@@ -47,7 +47,8 @@ for supplier in "${suppliers[@]}"; do
exit 1
}
- rater/tame/progtest/bin/runner "$path_suppliers/$base.js" $tests \
+ # note that this depends on the _stripped_ version
+ rater/tame/progtest/bin/runner "$path_suppliers/$base.strip.js" $tests \
|| result=1
done