Make WordPress Core

Changeset 56930


Ignore:
Timestamp:
10/13/2023 12:32:28 PM (8 months ago)
Author:
swissspidy
Message:

Build/Test Tools: Fix path check when comparing performance test results.

This is a follow-up to r56926, r56927, r56928.

See #59517.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/performance/compare-results.js

    r56926 r56930  
    2929const testResults = Object.fromEntries(
    3030    testSuites
    31         .filter( ( key ) => fs.existsSync( `${ key }.test.results.json` ) )
     31        .filter( ( key ) => fs.existsSync( path.join( __dirname, '/specs/', `${ key }.test.results.json` ) ) )
    3232        .map( ( key ) => [ key, parseFile( `${ key }.test.results.json` ) ] )
    3333);
     
    3636const prevResults = Object.fromEntries(
    3737    testSuites
    38         .filter( ( key ) => fs.existsSync( `before-${ key }.test.results.json` ) )
     38        .filter( ( key ) => fs.existsSync( path.join( __dirname, '/specs/', `before-${ key }.test.results.json` ) ) )
    3939        .map( ( key ) => [ key, parseFile( `before-${ key }.test.results.json` ) ] )
    4040);
Note: See TracChangeset for help on using the changeset viewer.