build: remove legacy integration test runner (#35985)
* integration tests target definitions in integration/BUILD.bazel updated to use a single dict * payload tracking for integration tests updated to work under Bazel * legacy integration_test CI job removed * integration/run_tests.sh script no longer used in CI so it has been updated for running integration tests locally in the legacy way PR Close #35985
This commit is contained in:

committed by
Andrew Kushnir

parent
99ea5d7044
commit
2b6028b643
@ -131,6 +131,22 @@ function copyToTmp(files) {
|
||||
tmp.dirSync({keep: KEEP_TMP, unsafeCleanup: !KEEP_TMP}).name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Expands environment variables in a string of the form ${FOO_BAR}.
|
||||
*/
|
||||
function expandEnv(s) {
|
||||
if (!s) return s;
|
||||
const reg = /\$\{(\w+)\}/g;
|
||||
return s.replace(reg, (matched) => {
|
||||
const varName = matched.substring(2, matched.length - 1);
|
||||
if (process.env.hasOwnProperty(varName)) {
|
||||
return process.env[varName];
|
||||
} else {
|
||||
throw `Failed to expand unbound environment variable '${varName}' in '${s}'`;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* TestRunner handles setting up the integration test and executing
|
||||
* the test commands based on the config.
|
||||
@ -153,7 +169,7 @@ class TestRunner {
|
||||
// and quoted arguments that contain spaces
|
||||
const split = command.split(' ');
|
||||
let binary = split[0];
|
||||
const args = split.slice(1);
|
||||
const args = split.slice(1).map(a => expandEnv(a));
|
||||
switch (binary) {
|
||||
case 'patch-package-json': {
|
||||
let packageJsonFile = 'package.json';
|
||||
|
Reference in New Issue
Block a user