From e3fcd6eba3b99b6e2314b20f3be8cd2261f9d59c Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Thu, 17 Oct 2019 13:11:35 -0700 Subject: [PATCH] tests(smokehouse): fix tmp directory creation (#9855) --- lighthouse-cli/test/smokehouse/smokehouse.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lighthouse-cli/test/smokehouse/smokehouse.js b/lighthouse-cli/test/smokehouse/smokehouse.js index f133da82822e..dd21f44acd49 100755 --- a/lighthouse-cli/test/smokehouse/smokehouse.js +++ b/lighthouse-cli/test/smokehouse/smokehouse.js @@ -9,6 +9,7 @@ /* eslint-disable no-console */ const fs = require('fs'); +const mkdirp = require('mkdirp'); const spawnSync = require('child_process').spawnSync; const yargs = require('yargs'); const log = require('lighthouse-logger'); @@ -124,7 +125,10 @@ if (!smokeTest) { throw new Error(`could not find smoke ${smokeId}`); } -const configPath = `./.tmp/smoke-config-${smokeTest.id}.json`; +const lhRootDir = `${__dirname}/../../..`; +const tmpDir = `${lhRootDir}/.tmp`; +mkdirp.sync(tmpDir); +const configPath = `${tmpDir}/smoke-config-${smokeTest.id}.json`; fs.writeFileSync(configPath, JSON.stringify(smokeTest.config)); // Loop sequentially over expectations, comparing against Lighthouse run, and