Since /sbin/fw4 invokes ucode in strict mode, we should do the same in
test cases.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
local code=$7
local fail=0
- ucode ${uenv:+-e "$uenv"} -e '{
+ ucode -S ${uenv:+-e "$uenv"} -e '{
"MOCK_SEARCH_PATH": [
"'"$dir"'/files",
"./tests/mocks"
{%
+ /* strict mode compliance: ensure that global variabes are defined */
+ if (!exists(global, 'REQUIRE_SEARCH_PATH'))
+ global.MOCK_SEARCH_PATH = null;
+
+ if (!exists(global, 'MOCK_SEARCH_PATH'))
+ global.MOCK_SEARCH_PATH = null;
+
+ if (!exists(global, 'TRACE_CALLS'))
+ global.TRACE_CALLS = null;
+
let _fs = require("fs");
/* Force reloading fs module on next require */
let fixup_config = (config) => {
let rv = {};
+ let n_section = 0;
for (let stype in config) {
switch (type(config[stype])) {