Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Broken test masked by broken test harness (engine/language_tests/base/include_b.szl) #35

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

The szl_regtest.sh test base/include_b.szl is broken; it should not pass.
The szl_regtest.sh support script ./update has a bug which masks the brokenness.

The test apparently is intended to work like so:
 - base/include_b.szl loads and executes base/include_dir/a.szl
 - a.szl includes b.szl
 - b.szl declares a variable x
 - base/include_b.szl assigns to x (thereby checking that b.szl was successfully executed)

However, this cannot work as (apparently) intended because include_b.szl uses 
the load() builtin to load a.szl, and load() does not attempt to execute or 
otherwise interpret the bytes that it loads. Ref: 
http://szl.googlecode.com/svn/doc/sawzall-intrinsics.html

The test harness support script src/engine/language_tests/update has a large 
shell-case-statement with special settings for different test sources. The case 
for base/include_b.szl inserts "base/include_dir/a.szl" into the $sources 
variable. However, only the first word in that variable is used as the szl 
program; subsequent words are used as input data filenames. The effect of all 
this is that the test executes a.szl and ignores include_b.szl.

I am at a loss to recommend a fix, as the whole test appears to be a confusion 
of ideas complicated by a confused idea. I recommend deleting all three files 
unless the author has a better idea.

Original issue reported on code.google.com by aecolley on 3 Jun 2014 at 3:15

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant