mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-05-23 11:21:02 +02:00
Add tests (and CI) to ensure that preference generation works correctly for all relevant build-targets
Given that previous patches reduced that number of build-targets running this code, ensure that it's still tested sufficiently.
This commit is contained in:
parent
2a83f955b0
commit
5d02076313
31
.github/workflows/prefs_tests.yml
vendored
Normal file
31
.github/workflows/prefs_tests.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Prefs tests
|
||||||
|
on: [push, pull_request]
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
node-version: [lts/*]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Run prefs tests
|
||||||
|
run: npx gulp prefstest
|
||||||
140
gulpfile.mjs
140
gulpfile.mjs
@ -68,6 +68,7 @@ const GH_PAGES_DIR = BUILD_DIR + "gh-pages/";
|
|||||||
const DIST_DIR = BUILD_DIR + "dist/";
|
const DIST_DIR = BUILD_DIR + "dist/";
|
||||||
const TYPES_DIR = BUILD_DIR + "types/";
|
const TYPES_DIR = BUILD_DIR + "types/";
|
||||||
const TMP_DIR = BUILD_DIR + "tmp/";
|
const TMP_DIR = BUILD_DIR + "tmp/";
|
||||||
|
const PREFSTEST_DIR = BUILD_DIR + "prefstest/";
|
||||||
const TYPESTEST_DIR = BUILD_DIR + "typestest/";
|
const TYPESTEST_DIR = BUILD_DIR + "typestest/";
|
||||||
const COMMON_WEB_FILES = [
|
const COMMON_WEB_FILES = [
|
||||||
"web/images/*.{png,svg,gif}",
|
"web/images/*.{png,svg,gif}",
|
||||||
@ -677,8 +678,7 @@ function getTempFile(prefix, suffix) {
|
|||||||
|
|
||||||
function runTests(testsName, { bot = false, xfaOnly = false } = {}) {
|
function runTests(testsName, { bot = false, xfaOnly = false } = {}) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log();
|
console.log("\n### Running " + testsName + " tests");
|
||||||
console.log("### Running " + testsName + " tests");
|
|
||||||
|
|
||||||
const PDF_TEST = process.env.PDF_TEST || "test_manifest.json";
|
const PDF_TEST = process.env.PDF_TEST || "test_manifest.json";
|
||||||
let forceNoChrome = false;
|
let forceNoChrome = false;
|
||||||
@ -763,8 +763,7 @@ function collectArgs(options, args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function makeRef(done, bot) {
|
function makeRef(done, bot) {
|
||||||
console.log();
|
console.log("\n### Creating reference images");
|
||||||
console.log("### Creating reference images");
|
|
||||||
|
|
||||||
let forceNoChrome = false;
|
let forceNoChrome = false;
|
||||||
const args = ["test.mjs", "--masterMode"];
|
const args = ["test.mjs", "--masterMode"];
|
||||||
@ -815,8 +814,7 @@ gulp.task("default", function (done) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function createBuildNumber(done) {
|
function createBuildNumber(done) {
|
||||||
console.log();
|
console.log("\n### Getting extension build number");
|
||||||
console.log("### Getting extension build number");
|
|
||||||
|
|
||||||
exec(
|
exec(
|
||||||
"git log --format=oneline " + config.baseVersion + "..",
|
"git log --format=oneline " + config.baseVersion + "..",
|
||||||
@ -861,8 +859,7 @@ function createBuildNumber(done) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildDefaultPreferences(defines, dir) {
|
function buildDefaultPreferences(defines, dir) {
|
||||||
console.log();
|
console.log(`\n### Building default preferences (${dir})`);
|
||||||
console.log("### Building default preferences");
|
|
||||||
|
|
||||||
const bundleDefines = {
|
const bundleDefines = {
|
||||||
...defines,
|
...defines,
|
||||||
@ -889,8 +886,7 @@ function buildDefaultPreferences(defines, dir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getDefaultPreferences(dir) {
|
function getDefaultPreferences(dir) {
|
||||||
console.log();
|
console.log(`\n### Parsing default preferences (${dir})`);
|
||||||
console.log("### Parsing default preferences");
|
|
||||||
|
|
||||||
const require = process
|
const require = process
|
||||||
.getBuiltinModule("module")
|
.getBuiltinModule("module")
|
||||||
@ -905,7 +901,7 @@ function getDefaultPreferences(dir) {
|
|||||||
/* defaultOnly = */ true
|
/* defaultOnly = */ true
|
||||||
);
|
);
|
||||||
if (Object.keys(prefs).length === 0) {
|
if (Object.keys(prefs).length === 0) {
|
||||||
throw new Error("No default preferences found.");
|
throw new Error(`No default preferences found in "${dir}".`);
|
||||||
}
|
}
|
||||||
return prefs;
|
return prefs;
|
||||||
}
|
}
|
||||||
@ -928,8 +924,7 @@ function getDefaultFtl() {
|
|||||||
gulp.task("locale", function () {
|
gulp.task("locale", function () {
|
||||||
const VIEWER_LOCALE_OUTPUT = "web/locale/";
|
const VIEWER_LOCALE_OUTPUT = "web/locale/";
|
||||||
|
|
||||||
console.log();
|
console.log("\n### Building localization files");
|
||||||
console.log("### Building localization files");
|
|
||||||
|
|
||||||
fs.rmSync(VIEWER_LOCALE_OUTPUT, { recursive: true, force: true });
|
fs.rmSync(VIEWER_LOCALE_OUTPUT, { recursive: true, force: true });
|
||||||
fs.mkdirSync(VIEWER_LOCALE_OUTPUT, { recursive: true });
|
fs.mkdirSync(VIEWER_LOCALE_OUTPUT, { recursive: true });
|
||||||
@ -977,8 +972,7 @@ gulp.task("cmaps", async function () {
|
|||||||
const CMAP_INPUT = "external/cmaps";
|
const CMAP_INPUT = "external/cmaps";
|
||||||
const VIEWER_CMAP_OUTPUT = "external/bcmaps";
|
const VIEWER_CMAP_OUTPUT = "external/bcmaps";
|
||||||
|
|
||||||
console.log();
|
console.log("\n### Building cmaps");
|
||||||
console.log("### Building cmaps");
|
|
||||||
|
|
||||||
// Testing a file that usually present.
|
// Testing a file that usually present.
|
||||||
if (!checkFile(CMAP_INPUT + "/UniJIS-UCS2-H")) {
|
if (!checkFile(CMAP_INPUT + "/UniJIS-UCS2-H")) {
|
||||||
@ -1086,8 +1080,7 @@ gulp.task(
|
|||||||
return createTemporaryScriptingBundle(defines);
|
return createTemporaryScriptingBundle(defines);
|
||||||
},
|
},
|
||||||
function createGeneric() {
|
function createGeneric() {
|
||||||
console.log();
|
console.log("\n### Creating generic viewer");
|
||||||
console.log("### Creating generic viewer");
|
|
||||||
const defines = { ...DEFINES, GENERIC: true };
|
const defines = { ...DEFINES, GENERIC: true };
|
||||||
|
|
||||||
return buildGeneric(defines, GENERIC_DIR);
|
return buildGeneric(defines, GENERIC_DIR);
|
||||||
@ -1107,8 +1100,7 @@ gulp.task(
|
|||||||
return createTemporaryScriptingBundle(defines);
|
return createTemporaryScriptingBundle(defines);
|
||||||
},
|
},
|
||||||
function createGenericLegacy() {
|
function createGenericLegacy() {
|
||||||
console.log();
|
console.log("\n### Creating generic (legacy) viewer");
|
||||||
console.log("### Creating generic (legacy) viewer");
|
|
||||||
const defines = { ...DEFINES, GENERIC: true, SKIP_BABEL: false };
|
const defines = { ...DEFINES, GENERIC: true, SKIP_BABEL: false };
|
||||||
|
|
||||||
return buildGeneric(defines, GENERIC_LEGACY_DIR);
|
return buildGeneric(defines, GENERIC_LEGACY_DIR);
|
||||||
@ -1143,8 +1135,7 @@ function buildComponents(defines, dir) {
|
|||||||
gulp.task(
|
gulp.task(
|
||||||
"components",
|
"components",
|
||||||
gulp.series(createBuildNumber, function createComponents() {
|
gulp.series(createBuildNumber, function createComponents() {
|
||||||
console.log();
|
console.log("\n### Creating generic components");
|
||||||
console.log("### Creating generic components");
|
|
||||||
const defines = { ...DEFINES, COMPONENTS: true, GENERIC: true };
|
const defines = { ...DEFINES, COMPONENTS: true, GENERIC: true };
|
||||||
|
|
||||||
return buildComponents(defines, COMPONENTS_DIR);
|
return buildComponents(defines, COMPONENTS_DIR);
|
||||||
@ -1154,8 +1145,7 @@ gulp.task(
|
|||||||
gulp.task(
|
gulp.task(
|
||||||
"components-legacy",
|
"components-legacy",
|
||||||
gulp.series(createBuildNumber, function createComponentsLegacy() {
|
gulp.series(createBuildNumber, function createComponentsLegacy() {
|
||||||
console.log();
|
console.log("\n### Creating generic (legacy) components");
|
||||||
console.log("### Creating generic (legacy) components");
|
|
||||||
const defines = {
|
const defines = {
|
||||||
...DEFINES,
|
...DEFINES,
|
||||||
COMPONENTS: true,
|
COMPONENTS: true,
|
||||||
@ -1170,8 +1160,7 @@ gulp.task(
|
|||||||
gulp.task(
|
gulp.task(
|
||||||
"image_decoders",
|
"image_decoders",
|
||||||
gulp.series(createBuildNumber, function createImageDecoders() {
|
gulp.series(createBuildNumber, function createImageDecoders() {
|
||||||
console.log();
|
console.log("\n### Creating image decoders");
|
||||||
console.log("### Creating image decoders");
|
|
||||||
const defines = { ...DEFINES, GENERIC: true, IMAGE_DECODERS: true };
|
const defines = { ...DEFINES, GENERIC: true, IMAGE_DECODERS: true };
|
||||||
|
|
||||||
return createImageDecodersBundle(defines).pipe(
|
return createImageDecodersBundle(defines).pipe(
|
||||||
@ -1183,8 +1172,7 @@ gulp.task(
|
|||||||
gulp.task(
|
gulp.task(
|
||||||
"image_decoders-legacy",
|
"image_decoders-legacy",
|
||||||
gulp.series(createBuildNumber, function createImageDecodersLegacy() {
|
gulp.series(createBuildNumber, function createImageDecodersLegacy() {
|
||||||
console.log();
|
console.log("\n### Creating (legacy) image decoders");
|
||||||
console.log("### Creating (legacy) image decoders");
|
|
||||||
const defines = {
|
const defines = {
|
||||||
...DEFINES,
|
...DEFINES,
|
||||||
GENERIC: true,
|
GENERIC: true,
|
||||||
@ -1221,8 +1209,7 @@ gulp.task(
|
|||||||
return createTemporaryScriptingBundle(defines);
|
return createTemporaryScriptingBundle(defines);
|
||||||
},
|
},
|
||||||
function createMinified() {
|
function createMinified() {
|
||||||
console.log();
|
console.log("\n### Creating minified viewer");
|
||||||
console.log("### Creating minified viewer");
|
|
||||||
const defines = { ...DEFINES, MINIFIED: true, GENERIC: true };
|
const defines = { ...DEFINES, MINIFIED: true, GENERIC: true };
|
||||||
|
|
||||||
return buildMinified(defines, MINIFIED_DIR);
|
return buildMinified(defines, MINIFIED_DIR);
|
||||||
@ -1245,8 +1232,7 @@ gulp.task(
|
|||||||
return createTemporaryScriptingBundle(defines);
|
return createTemporaryScriptingBundle(defines);
|
||||||
},
|
},
|
||||||
function createMinifiedLegacy() {
|
function createMinifiedLegacy() {
|
||||||
console.log();
|
console.log("\n### Creating minified (legacy) viewer");
|
||||||
console.log("### Creating minified (legacy) viewer");
|
|
||||||
const defines = {
|
const defines = {
|
||||||
...DEFINES,
|
...DEFINES,
|
||||||
MINIFIED: true,
|
MINIFIED: true,
|
||||||
@ -1260,6 +1246,8 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function createDefaultPrefsFile() {
|
function createDefaultPrefsFile() {
|
||||||
|
console.log("\n### Building mozilla-central preferences file");
|
||||||
|
|
||||||
const defaultFileName = "PdfJsDefaultPrefs.js",
|
const defaultFileName = "PdfJsDefaultPrefs.js",
|
||||||
overrideFileName = "PdfJsOverridePrefs.js";
|
overrideFileName = "PdfJsOverridePrefs.js";
|
||||||
const licenseHeader = fs.readFileSync("./src/license_header.js").toString();
|
const licenseHeader = fs.readFileSync("./src/license_header.js").toString();
|
||||||
@ -1299,8 +1287,7 @@ gulp.task(
|
|||||||
return buildDefaultPreferences(defines, "mozcentral/");
|
return buildDefaultPreferences(defines, "mozcentral/");
|
||||||
},
|
},
|
||||||
function createMozcentral() {
|
function createMozcentral() {
|
||||||
console.log();
|
console.log("\n### Building mozilla-central extension");
|
||||||
console.log("### Building mozilla-central extension");
|
|
||||||
const defines = { ...DEFINES, MOZCENTRAL: true };
|
const defines = { ...DEFINES, MOZCENTRAL: true };
|
||||||
const gvDefines = { ...defines, GECKOVIEW: true };
|
const gvDefines = { ...defines, GECKOVIEW: true };
|
||||||
|
|
||||||
@ -1392,6 +1379,8 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function createChromiumPrefsSchema() {
|
function createChromiumPrefsSchema() {
|
||||||
|
console.log("\n### Building Chromium preferences file");
|
||||||
|
|
||||||
const prefs = getDefaultPreferences("chromium/");
|
const prefs = getDefaultPreferences("chromium/");
|
||||||
const chromiumPrefs = buildPrefsSchema(prefs);
|
const chromiumPrefs = buildPrefsSchema(prefs);
|
||||||
|
|
||||||
@ -1414,8 +1403,7 @@ gulp.task(
|
|||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
function createChromium() {
|
function createChromium() {
|
||||||
console.log();
|
console.log("\n### Building Chromium extension");
|
||||||
console.log("### Building Chromium extension");
|
|
||||||
const defines = { ...DEFINES, CHROME: true, SKIP_BABEL: false };
|
const defines = { ...DEFINES, CHROME: true, SKIP_BABEL: false };
|
||||||
|
|
||||||
const CHROME_BUILD_DIR = BUILD_DIR + "/chromium/",
|
const CHROME_BUILD_DIR = BUILD_DIR + "/chromium/",
|
||||||
@ -1502,8 +1490,7 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
|
|
||||||
gulp.task("jsdoc", function (done) {
|
gulp.task("jsdoc", function (done) {
|
||||||
console.log();
|
console.log("\n### Generating documentation (JSDoc)");
|
||||||
console.log("### Generating documentation (JSDoc)");
|
|
||||||
|
|
||||||
fs.rmSync(JSDOC_BUILD_DIR, { recursive: true, force: true });
|
fs.rmSync(JSDOC_BUILD_DIR, { recursive: true, force: true });
|
||||||
fs.mkdirSync(JSDOC_BUILD_DIR, { recursive: true });
|
fs.mkdirSync(JSDOC_BUILD_DIR, { recursive: true });
|
||||||
@ -1813,6 +1800,49 @@ gulp.task(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
gulp.task(
|
||||||
|
"prefstest",
|
||||||
|
gulp.series(
|
||||||
|
setTestEnv,
|
||||||
|
function genericPrefs() {
|
||||||
|
const defines = { ...DEFINES, GENERIC: true };
|
||||||
|
return buildDefaultPreferences(defines, "generic/");
|
||||||
|
},
|
||||||
|
function genericLegacyPrefs() {
|
||||||
|
const defines = { ...DEFINES, GENERIC: true, SKIP_BABEL: false };
|
||||||
|
return buildDefaultPreferences(defines, "generic-legacy/");
|
||||||
|
},
|
||||||
|
function chromiumPrefs() {
|
||||||
|
const defines = { ...DEFINES, CHROME: true, SKIP_BABEL: false };
|
||||||
|
return buildDefaultPreferences(defines, "chromium/");
|
||||||
|
},
|
||||||
|
function mozcentralPrefs() {
|
||||||
|
const defines = { ...DEFINES, MOZCENTRAL: true };
|
||||||
|
return buildDefaultPreferences(defines, "mozcentral/");
|
||||||
|
},
|
||||||
|
function checkPrefs() {
|
||||||
|
console.log("\n### Checking preference generation");
|
||||||
|
|
||||||
|
// Check that the preferences were correctly generated,
|
||||||
|
// for all the relevant builds.
|
||||||
|
for (const dir of [
|
||||||
|
"generic/",
|
||||||
|
"generic-legacy/",
|
||||||
|
"chromium/",
|
||||||
|
"mozcentral/",
|
||||||
|
]) {
|
||||||
|
getDefaultPreferences(dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check that all the relevant files can be generated.
|
||||||
|
return ordered([
|
||||||
|
createChromiumPrefsSchema().pipe(gulp.dest(PREFSTEST_DIR)),
|
||||||
|
createDefaultPrefsFile().pipe(gulp.dest(PREFSTEST_DIR)),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"typestest",
|
"typestest",
|
||||||
gulp.series(
|
gulp.series(
|
||||||
@ -1846,8 +1876,7 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
|
|
||||||
function createBaseline(done) {
|
function createBaseline(done) {
|
||||||
console.log();
|
console.log("\n### Creating baseline environment");
|
||||||
console.log("### Creating baseline environment");
|
|
||||||
|
|
||||||
const baselineCommit = process.env.BASELINE;
|
const baselineCommit = process.env.BASELINE;
|
||||||
if (!baselineCommit) {
|
if (!baselineCommit) {
|
||||||
@ -1908,8 +1937,7 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
|
|
||||||
gulp.task("lint", function (done) {
|
gulp.task("lint", function (done) {
|
||||||
console.log();
|
console.log("\n### Linting JS/CSS/JSON/SVG/HTML files");
|
||||||
console.log("### Linting JS/CSS/JSON/SVG/HTML files");
|
|
||||||
|
|
||||||
// Ensure that we lint the Firefox specific *.jsm files too.
|
// Ensure that we lint the Firefox specific *.jsm files too.
|
||||||
const esLintOptions = [
|
const esLintOptions = [
|
||||||
@ -1989,8 +2017,7 @@ gulp.task("lint", function (done) {
|
|||||||
gulp.task(
|
gulp.task(
|
||||||
"lint-mozcentral",
|
"lint-mozcentral",
|
||||||
gulp.series("mozcentral", function runLintMozcentral(done) {
|
gulp.series("mozcentral", function runLintMozcentral(done) {
|
||||||
console.log();
|
console.log("\n### Checking mozilla-central files");
|
||||||
console.log("### Checking mozilla-central files");
|
|
||||||
|
|
||||||
const styleLintOptions = [
|
const styleLintOptions = [
|
||||||
"../../node_modules/stylelint/bin/stylelint.mjs",
|
"../../node_modules/stylelint/bin/stylelint.mjs",
|
||||||
@ -2034,8 +2061,7 @@ gulp.task(
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
function createDevSandbox() {
|
function createDevSandbox() {
|
||||||
console.log();
|
console.log("\n### Building development sandbox");
|
||||||
console.log("### Building development sandbox");
|
|
||||||
|
|
||||||
const defines = { ...DEFINES, GENERIC: true, TESTING: true };
|
const defines = { ...DEFINES, GENERIC: true, TESTING: true };
|
||||||
const sandboxDir = BUILD_DIR + "dev-sandbox/";
|
const sandboxDir = BUILD_DIR + "dev-sandbox/";
|
||||||
@ -2079,8 +2105,7 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
async function createServer() {
|
async function createServer() {
|
||||||
console.log();
|
console.log("\n### Starting local server");
|
||||||
console.log("### Starting local server");
|
|
||||||
|
|
||||||
let port = 8888;
|
let port = 8888;
|
||||||
const i = process.argv.indexOf("--port");
|
const i = process.argv.indexOf("--port");
|
||||||
@ -2101,8 +2126,7 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
|
|
||||||
gulp.task("clean", function (done) {
|
gulp.task("clean", function (done) {
|
||||||
console.log();
|
console.log("\n### Cleaning up project builds");
|
||||||
console.log("### Cleaning up project builds");
|
|
||||||
|
|
||||||
fs.rmSync(BUILD_DIR, { recursive: true, force: true });
|
fs.rmSync(BUILD_DIR, { recursive: true, force: true });
|
||||||
done();
|
done();
|
||||||
@ -2111,8 +2135,7 @@ gulp.task("clean", function (done) {
|
|||||||
gulp.task("importl10n", async function () {
|
gulp.task("importl10n", async function () {
|
||||||
const { downloadL10n } = await import("./external/importL10n/locales.mjs");
|
const { downloadL10n } = await import("./external/importL10n/locales.mjs");
|
||||||
|
|
||||||
console.log();
|
console.log("\n### Importing translations from mozilla-central");
|
||||||
console.log("### Importing translations from mozilla-central");
|
|
||||||
|
|
||||||
if (!fs.existsSync(L10N_DIR)) {
|
if (!fs.existsSync(L10N_DIR)) {
|
||||||
fs.mkdirSync(L10N_DIR);
|
fs.mkdirSync(L10N_DIR);
|
||||||
@ -2121,8 +2144,7 @@ gulp.task("importl10n", async function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function ghPagesPrepare() {
|
function ghPagesPrepare() {
|
||||||
console.log();
|
console.log("\n### Creating web site");
|
||||||
console.log("### Creating web site");
|
|
||||||
|
|
||||||
fs.rmSync(GH_PAGES_DIR, { recursive: true, force: true });
|
fs.rmSync(GH_PAGES_DIR, { recursive: true, force: true });
|
||||||
|
|
||||||
@ -2391,8 +2413,7 @@ gulp.task(
|
|||||||
gulp.task(
|
gulp.task(
|
||||||
"mozcentralbaseline",
|
"mozcentralbaseline",
|
||||||
gulp.series(createBaseline, function createMozcentralBaseline(done) {
|
gulp.series(createBaseline, function createMozcentralBaseline(done) {
|
||||||
console.log();
|
console.log("\n### Creating mozcentral baseline environment");
|
||||||
console.log("### Creating mozcentral baseline environment");
|
|
||||||
|
|
||||||
// Create a mozcentral build.
|
// Create a mozcentral build.
|
||||||
fs.rmSync(BASELINE_DIR + BUILD_DIR, { recursive: true, force: true });
|
fs.rmSync(BASELINE_DIR + BUILD_DIR, { recursive: true, force: true });
|
||||||
@ -2429,8 +2450,7 @@ gulp.task(
|
|||||||
"mozcentral",
|
"mozcentral",
|
||||||
"mozcentralbaseline",
|
"mozcentralbaseline",
|
||||||
function createMozcentralDiff(done) {
|
function createMozcentralDiff(done) {
|
||||||
console.log();
|
console.log("\n### Creating mozcentral diff");
|
||||||
console.log("### Creating mozcentral diff");
|
|
||||||
|
|
||||||
// Create the diff between the current mozcentral build and the
|
// Create the diff between the current mozcentral build and the
|
||||||
// baseline mozcentral build, which both exist at this point.
|
// baseline mozcentral build, which both exist at this point.
|
||||||
@ -2472,14 +2492,12 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
|
|
||||||
gulp.task("externaltest", function (done) {
|
gulp.task("externaltest", function (done) {
|
||||||
console.log();
|
console.log("\n### Running test-fixtures.js");
|
||||||
console.log("### Running test-fixtures.js");
|
|
||||||
safeSpawnSync("node", ["external/builder/test-fixtures.mjs"], {
|
safeSpawnSync("node", ["external/builder/test-fixtures.mjs"], {
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log();
|
console.log("\n### Running test-fixtures_babel.js");
|
||||||
console.log("### Running test-fixtures_babel.js");
|
|
||||||
safeSpawnSync("node", ["external/builder/test-fixtures_babel.mjs"], {
|
safeSpawnSync("node", ["external/builder/test-fixtures_babel.mjs"], {
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
});
|
});
|
||||||
|
|||||||
@ -582,7 +582,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING || LIB")) {
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING")) {
|
||||||
// Ensure that the `defaultOptions` are correctly specified.
|
// Ensure that the `defaultOptions` are correctly specified.
|
||||||
for (const name in defaultOptions) {
|
for (const name in defaultOptions) {
|
||||||
const { value, kind, type } = defaultOptions[name];
|
const { value, kind, type } = defaultOptions[name];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user