Skip to content

Commit d3ef3bf

Browse files
jelbournkara
authored andcommitted
chore(ivy): rename "blacklist" to "blocklist"
1 parent fb8758c commit d3ef3bf

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

scripts/ivy/generate-blacklist.js renamed to scripts/ivy/generate-blocklist.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@ const fs = require('fs');
66
const karmaOutput = JSON.parse(fs.readFileSync('/tmp/karma-result.json'));
77

88

9-
let generatedBlacklist = {};
9+
let generatedBlocklist = {};
1010
for (const desc of Object.keys(karmaOutput)) {
11-
generatedBlacklist = {...generatedBlacklist, ...getFullFailure(karmaOutput[desc], desc)};
11+
generatedBlocklist = {...generatedBlocklist, ...getFullFailure(karmaOutput[desc], desc)};
1212
}
1313

14-
// We want to "remember" the notes from the current blacklist on angular/angular unless the
14+
// We want to "remember" the notes from the current blocklist on angular/angular unless the
1515
// error message has changed. We need to know where the local angular/angular repo is.
1616
const angularRepoPath = process.argv[2];
1717
if (!angularRepoPath) {
1818
console.error('Please provide the path to your local angular/angular repo as the first argument');
1919
process.exit(1);
2020
}
2121

22-
// Read the contents of the previous blacklist.
23-
const previousBlacklistPath =
24-
path.join(angularRepoPath, 'tools', 'material-ci', 'angular_material_test_blacklist.js');
25-
const previousBlacklistContent = fs.readFileSync(previousBlacklistPath, 'utf-8');
22+
// Read the contents of the previous blocklist.
23+
const previousBlocklistPath =
24+
path.join(angularRepoPath, 'tools', 'material-ci', 'angular_material_test_blocklist.js');
25+
const previousBlocklistContent = fs.readFileSync(previousBlocklistPath, 'utf-8');
2626

27-
// Because the blacklist is a javascript file meant to be executed, we just actually execute it with
27+
// Because the blocklist is a javascript file meant to be executed, we just actually execute it with
2828
// eval. Create a dummy `window` for it to add to.
2929
const window = {};
30-
eval(previousBlacklistContent);
31-
const previousBlacklist = window.testBlacklist;
30+
eval(previousBlocklistContent);
31+
const previousBlocklist = window.testBlocklist;
3232

3333
// Copy any existing test notes.
34-
for (const testName of Object.keys(generatedBlacklist)) {
35-
if (previousBlacklist[testName] &&
36-
generatedBlacklist[testName].error === previousBlacklist[testName].error) {
37-
generatedBlacklist[testName].notes = previousBlacklist[testName].notes;
34+
for (const testName of Object.keys(generatedBlocklist)) {
35+
if (previousBlocklist[testName] &&
36+
generatedBlocklist[testName].error === previousBlocklist[testName].error) {
37+
generatedBlocklist[testName].notes = previousBlocklist[testName].notes;
3838
}
3939
}
4040

@@ -49,24 +49,24 @@ const output =
4949
*/
5050
5151
/**
52-
* Blacklist of unit tests from angular/material2 with ivy that are skipped when running on
53-
* angular/angular. As bugs are resolved, items should be removed from this blacklist.
52+
* Blocklist of unit tests from angular/material2 with ivy that are skipped when running on
53+
* angular/angular. As bugs are resolved, items should be removed from this blocklist.
5454
*
5555
* The \`notes\` section should be used to keep track of specific issues associated with the failures.
5656
*/
5757
5858
// clang-format off
5959
// tslint:disable
6060
61-
window.testBlacklist = ${JSON.stringify(generatedBlacklist, null, 2)};
61+
window.testBlocklist = ${JSON.stringify(generatedBlocklist, null, 2)};
6262
// clang-format on`;
6363

6464
// Write that sucker to dist.
65-
fs.writeFileSync('dist/angular_material_test_blacklist.js', output, 'utf-8');
65+
fs.writeFileSync('dist/angular_material_test_blocklist.js', output, 'utf-8');
6666

6767

6868
/**
69-
* Given a karma test result, get a blacklist entry in the form
69+
* Given a karma test result, get a blocklist entry in the form
7070
* {[full test name]: {error: '...', notes: '...'}}
7171
*/
7272
function getFullFailure(result, fullName = '') {

test/karma-test-shim.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ function patchTestBedToDestroyFixturesAfterEveryTest(testBed) {
9797
}
9898

9999

100-
// Filter out any tests explicitly given in the blacklist.
101-
// On the angular/material2 repo, this blacklist is always empty.
102-
// When these tests are run on angular/angular, the blacklist will be replaced
100+
// Filter out any tests explicitly given in the blocklist.
101+
// On the angular/material2 repo, this blocklist is always empty.
102+
// When these tests are run on angular/angular, the blocklist will be replaced
103103
// with all of the known failures when running the component tests with ivy.
104-
var testBlacklist = null;
104+
var testBlocklist = null;
105105
jasmine.getEnv().configure({
106106
specFilter: function(spec) {
107-
return !testBlacklist || !testBlacklist[spec.getFullName()];
107+
return !testBlocklist || !testBlocklist[spec.getFullName()];
108108
}
109109
});

0 commit comments

Comments
 (0)