This commit is contained in:
David Fugate 2012-03-28 16:05:03 -07:00
parent 2a112abbd5
commit 87be1bf6ec
16 changed files with 38 additions and 29 deletions

View File

@ -282,9 +282,7 @@ function TestLoader() {
tests: [] tests: []
}; };
} }
loader.onInitialized(loader.totalTests, loader.onInitialized(loader.totalTests);
loader.version,
loader.date);
getNextXML(); getNextXML();
}}); }});
} }
@ -369,9 +367,7 @@ function Controller() {
setTimeout(loader.getNextTest, 10); setTimeout(loader.getNextTest, 10);
}; };
loader.onInitialized = function(totalTests, version, date) { loader.onInitialized = function(totalTests) {
presenter.setVersion(version);
presenter.setDate(date);
presenter.setTotalTests(totalTests); presenter.setTotalTests(totalTests);
}; };
@ -489,4 +485,11 @@ $(function () {
$('.button-reset').click(function () { $('.button-reset').click(function () {
controller.reset(); controller.reset();
}); });
var SUITE_DESCRIP_PATH = "json/suiteDescrip.json";
$.ajax({ url: SUITE_DESCRIP_PATH, dataType: 'json', success: function (data) {
presenter.setVersion(data.version);
presenter.setDate(data.date);
}
});
}); });

View File

@ -271,9 +271,6 @@ for chapter in TEST_SUITE_SECTIONS:
if TESTCASELIST_PER_JSON: if TESTCASELIST_PER_JSON:
CHAPTER_TEST_CASES_JSON = {} CHAPTER_TEST_CASES_JSON = {}
CHAPTER_TEST_CASES_JSON["numTests"] = int(sect["numTests"]) CHAPTER_TEST_CASES_JSON["numTests"] = int(sect["numTests"])
CHAPTER_TEST_CASES_JSON["version"] = ARGS.version
CHAPTER_TEST_CASES_JSON["date"] = \
str(datetime.datetime.now().date())
CHAPTER_TEST_CASES_JSON["testSuite"] = \ CHAPTER_TEST_CASES_JSON["testSuite"] = \
[WEBSITE_CASES_PATH + chapterName + ".json"] [WEBSITE_CASES_PATH + chapterName + ".json"]
with open(os.path.join(TEST262_WEB_CASES_DIR, with open(os.path.join(TEST262_WEB_CASES_DIR,
@ -298,13 +295,18 @@ for chapter in TEST_SUITE_SECTIONS:
#create a root node for our suite #create a root node for our suite
TEST_CASES_JSON = {} TEST_CASES_JSON = {}
TEST_CASES_JSON["numTests"] = TOTAL_TEST_COUNT TEST_CASES_JSON["numTests"] = TOTAL_TEST_COUNT
TEST_CASES_JSON["version"] = ARGS.version
TEST_CASES_JSON["date"] = str(datetime.datetime.now().date())
TEST_CASES_JSON["testSuite"] = SECTIONS_LIST TEST_CASES_JSON["testSuite"] = SECTIONS_LIST
with open(os.path.join(TEST262_WEB_CASES_DIR, "default.json"), "w") as f: with open(os.path.join(TEST262_WEB_CASES_DIR, "default.json"), "w") as f:
json.dump(TEST_CASES_JSON, f, separators=(',',':'), sort_keys=True) json.dump(TEST_CASES_JSON, f, separators=(',',':'), sort_keys=True)
generateHarness(ARGS.type, "default.json", "Chapters 1-16") generateHarness(ARGS.type, "default.json", "Chapters 1-16")
#Overall description of this version of the test suite
SUITE_DESCRIP_JSON = {}
SUITE_DESCRIP_JSON["version"] = ARGS.version
SUITE_DESCRIP_JSON["date"] = str(datetime.datetime.now().date())
with open(os.path.join(TEST262_WEB_CASES_DIR, "suiteDescrip.json"), "w") as f:
json.dump(SUITE_DESCRIP_JSON, f, separators=(',',':'), sort_keys=True)
#Deploy test harness to website as well #Deploy test harness to website as well
print "" print ""
print "Deploying test harness files to 'TEST262_WEB_HARNESS_DIR'..." print "Deploying test harness files to 'TEST262_WEB_HARNESS_DIR'..."

View File

@ -282,9 +282,7 @@ function TestLoader() {
tests: [] tests: []
}; };
} }
loader.onInitialized(loader.totalTests, loader.onInitialized(loader.totalTests);
loader.version,
loader.date);
getNextXML(); getNextXML();
}}); }});
} }
@ -369,9 +367,7 @@ function Controller() {
setTimeout(loader.getNextTest, 10); setTimeout(loader.getNextTest, 10);
}; };
loader.onInitialized = function(totalTests, version, date) { loader.onInitialized = function(totalTests) {
presenter.setVersion(version);
presenter.setDate(date);
presenter.setTotalTests(totalTests); presenter.setTotalTests(totalTests);
}; };
@ -489,4 +485,11 @@ $(function () {
$('.button-reset').click(function () { $('.button-reset').click(function () {
controller.reset(); controller.reset();
}); });
var SUITE_DESCRIP_PATH = "json/suiteDescrip.json";
$.ajax({ url: SUITE_DESCRIP_PATH, dataType: 'json', success: function (data) {
presenter.setVersion(data.version);
presenter.setDate(data.date);
}
});
}); });

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":11563,"testSuite":["json/ch07.json","json/ch08.json","json/ch09.json","json/ch10.json","json/ch11.json","json/ch12.json","json/ch13.json","json/ch14.json","json/ch15.json"],"version":"ES5.1"} {"numTests":11563,"testSuite":["json/ch07.json","json/ch08.json","json/ch09.json","json/ch10.json","json/ch11.json","json/ch12.json","json/ch13.json","json/ch14.json","json/ch15.json"]}

View File

@ -0,0 +1 @@
{"date":"2012-03-28","version":"ES5.1"}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":20,"testSuite":["json/bestPractice.json"],"version":"ES5.1"} {"numTests":20,"testSuite":["json/bestPractice.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":715,"testSuite":["json/ch07.json"],"version":"ES5.1"} {"numTests":715,"testSuite":["json/ch07.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":182,"testSuite":["json/ch08.json"],"version":"ES5.1"} {"numTests":182,"testSuite":["json/ch08.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":128,"testSuite":["json/ch09.json"],"version":"ES5.1"} {"numTests":128,"testSuite":["json/ch09.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":372,"testSuite":["json/ch10.json"],"version":"ES5.1"} {"numTests":372,"testSuite":["json/ch10.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":1320,"testSuite":["json/ch11.json"],"version":"ES5.1"} {"numTests":1320,"testSuite":["json/ch11.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":521,"testSuite":["json/ch12.json"],"version":"ES5.1"} {"numTests":521,"testSuite":["json/ch12.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":230,"testSuite":["json/ch13.json"],"version":"ES5.1"} {"numTests":230,"testSuite":["json/ch13.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":24,"testSuite":["json/ch14.json"],"version":"ES5.1"} {"numTests":24,"testSuite":["json/ch14.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":8071,"testSuite":["json/ch15.json"],"version":"ES5.1"} {"numTests":8071,"testSuite":["json/ch15.json"]}

View File

@ -1 +1 @@
{"date":"2012-03-27","numTests":1,"testSuite":["json/intl402.json"],"version":"ES5.1"} {"numTests":1,"testSuite":["json/intl402.json"]}