Skip to content

Commit c98dd4a

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
Use artifact folder when non is provided
After https://crrev.com/c/7665478 there are new files, Let's just create a folder so we can ignore everything Bug: none Change-Id: I0e19e345a75837b1a033dd993e9025fa495c60bf Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7666458 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
1 parent 8a38b2b commit c98dd4a

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ test/perf/.generated
6262
.stylelintcache
6363
**/tsconfig.tsbuildinfo
6464

65-
# e2e test runner copies dumps into the source tree.
66-
*.dmp
65+
# test runner copies dumps into the source tree.
66+
artifacts/*
6767

6868
# cipd rollup binaries synced from third_party/
6969
node_modules/@rollup/rollup*/

test/conductor/test_config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,17 @@ function configureChrome(executablePath: string) {
111111
}
112112
}
113113

114+
const getDefaultArtifactDir = () => {
115+
const artifactsPath = path.join(SOURCE_ROOT, 'artifacts');
116+
if (!fs.existsSync(artifactsPath)) {
117+
fs.mkdirSync(artifactsPath);
118+
}
119+
return artifactsPath;
120+
};
121+
114122
export const TestConfig: Config = {
115123
tests: getTestsFromOptions(),
116-
artifactsDir: options['artifacts-dir'] || SOURCE_ROOT,
124+
artifactsDir: options['artifacts-dir'] || getDefaultArtifactDir(),
117125
chromeBinary: options['chrome-binary'] ?? defaultChromePath(),
118126
serverType: ServerType.HOSTED_MODE,
119127
debug: options['debug'],

test/unit/karma.conf.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@ const CustomChrome = function(this: any, _baseBrowserDecorator: unknown, args: B
6161
});
6262

6363
await (async function dumpCommandLineVariationsToFile() {
64-
if (!TestConfig.artifactsDir) {
65-
return;
66-
}
67-
6864
const versionPage = await browser.newPage();
6965
await versionPage.goto('chrome://version/?show-variations-cmd');
7066
const commandLineText =
@@ -73,7 +69,10 @@ const CustomChrome = function(this: any, _baseBrowserDecorator: unknown, args: B
7369

7470
if (commandLineText) {
7571
fs.writeFileSync(
76-
path.join(TestConfig.artifactsDir, 'variations-cmd.txt'), commandLineText, {encoding: 'utf-8'});
72+
path.join(TestConfig.artifactsDir, 'variations-cmd.txt'),
73+
commandLineText,
74+
{encoding: 'utf-8'},
75+
);
7776
}
7877
})();
7978

0 commit comments

Comments
 (0)