11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciif (!process.features.inspector) return; 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_cirequire('../common'); 61cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures'); 71cb0ef41Sopenharmony_ciconst tmpdir = require('../common/tmpdir'); 81cb0ef41Sopenharmony_ciconst assert = require('assert'); 91cb0ef41Sopenharmony_ciconst fs = require('fs'); 101cb0ef41Sopenharmony_ciconst { spawnSync } = require('child_process'); 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_citmpdir.refresh(); 131cb0ef41Sopenharmony_ciconst intervals = 20; 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ci{ 161cb0ef41Sopenharmony_ci const output = spawnSync(process.execPath, [ 171cb0ef41Sopenharmony_ci '-r', 181cb0ef41Sopenharmony_ci fixtures.path('v8-coverage', 'stop-coverage'), 191cb0ef41Sopenharmony_ci '-r', 201cb0ef41Sopenharmony_ci fixtures.path('v8-coverage', 'take-coverage'), 211cb0ef41Sopenharmony_ci fixtures.path('v8-coverage', 'interval'), 221cb0ef41Sopenharmony_ci ], { 231cb0ef41Sopenharmony_ci env: { 241cb0ef41Sopenharmony_ci ...process.env, 251cb0ef41Sopenharmony_ci NODE_V8_COVERAGE: tmpdir.path, 261cb0ef41Sopenharmony_ci NODE_DEBUG_NATIVE: 'INSPECTOR_PROFILER', 271cb0ef41Sopenharmony_ci TEST_INTERVALS: intervals 281cb0ef41Sopenharmony_ci }, 291cb0ef41Sopenharmony_ci }); 301cb0ef41Sopenharmony_ci console.log(output.stderr.toString()); 311cb0ef41Sopenharmony_ci assert.strictEqual(output.status, 0); 321cb0ef41Sopenharmony_ci const coverageFiles = fs.readdirSync(tmpdir.path); 331cb0ef41Sopenharmony_ci assert.strictEqual(coverageFiles.length, 0); 341cb0ef41Sopenharmony_ci} 35