Skip to content

Commit

Permalink
tests: move proto roundtrip json to .tmp/ (#10995)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored Jun 24, 2020
1 parent b8bc05a commit de273e9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ proto/scripts/*_processed.json
# require any lock file to be checked in explicitly
yarn.lock

proto/sample_v2_round_trip.json
2 changes: 1 addition & 1 deletion lighthouse-core/test/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getProtoRoundTrip() {
let itIfProtoExists;
try {
sampleResultsRoundtripStr =
fs.readFileSync(__dirname + '/../../proto/sample_v2_round_trip.json', 'utf-8');
fs.readFileSync(__dirname + '/../../.tmp/sample_v2_round_trip.json', 'utf-8');
describeIfProtoExists = describe;
itIfProtoExists = it;
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"ultradumbBenchmark": "./lighthouse-core/scripts/benchmark.js",
"minify-latest-run": "./lighthouse-core/scripts/lantern/minify-trace.js ./latest-run/defaultPass.trace.json ./latest-run/defaultPass.trace.min.json && ./lighthouse-core/scripts/lantern/minify-devtoolslog.js ./latest-run/defaultPass.devtoolslog.json ./latest-run/defaultPass.devtoolslog.min.json",
"compile-proto": "protoc --python_out=./ ./proto/lighthouse-result.proto && mv ./proto/*_pb2.py ./proto/scripts || (echo \"❌ Install protobuf ≥ 3.7.1 to compile the proto file.\" && false)",
"build-proto-roundtrip": "cd proto/scripts && PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2 python json_roundtrip_via_proto.py",
"build-proto-roundtrip": "mkdir -p ./tmp && cd proto/scripts && PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2 python json_roundtrip_via_proto.py",
"static-server": "node lighthouse-cli/test/fixtures/static-server.js"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion proto/scripts/json_roundtrip_via_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

path_sample_preprocessed = path_dir + '/sample_v2_processed.json'
path_sample = path_dir + '/../../lighthouse-core/test/results/sample_v2.json'
path_round_trip = path_dir + '/../sample_v2_round_trip.json'
path_round_trip = path_dir + '/../../.tmp/sample_v2_round_trip.json'

def clean():
try:
Expand Down

0 comments on commit de273e9

Please sign in to comment.