diff --git a/test/harness/sth.js b/test/harness/sth.js index 029a2cff0e..91656937c4 100644 --- a/test/harness/sth.js +++ b/test/harness/sth.js @@ -282,9 +282,7 @@ function TestLoader() { tests: [] }; } - loader.onInitialized(loader.totalTests, - loader.version, - loader.date); + loader.onInitialized(loader.totalTests); getNextXML(); }}); } @@ -369,9 +367,7 @@ function Controller() { setTimeout(loader.getNextTest, 10); }; - loader.onInitialized = function(totalTests, version, date) { - presenter.setVersion(version); - presenter.setDate(date); + loader.onInitialized = function(totalTests) { presenter.setTotalTests(totalTests); }; @@ -489,4 +485,11 @@ $(function () { $('.button-reset').click(function () { 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); + } + }); }); diff --git a/tools/packaging/packager.py b/tools/packaging/packager.py index 3e3a787a4f..1741748983 100644 --- a/tools/packaging/packager.py +++ b/tools/packaging/packager.py @@ -271,9 +271,6 @@ for chapter in TEST_SUITE_SECTIONS: if TESTCASELIST_PER_JSON: CHAPTER_TEST_CASES_JSON = {} 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"] = \ [WEBSITE_CASES_PATH + chapterName + ".json"] 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 TEST_CASES_JSON = {} 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 with open(os.path.join(TEST262_WEB_CASES_DIR, "default.json"), "w") as f: json.dump(TEST_CASES_JSON, f, separators=(',',':'), sort_keys=True) 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 print "" print "Deploying test harness files to 'TEST262_WEB_HARNESS_DIR'..." diff --git a/website/harness/sth.js b/website/harness/sth.js index 029a2cff0e..91656937c4 100644 --- a/website/harness/sth.js +++ b/website/harness/sth.js @@ -282,9 +282,7 @@ function TestLoader() { tests: [] }; } - loader.onInitialized(loader.totalTests, - loader.version, - loader.date); + loader.onInitialized(loader.totalTests); getNextXML(); }}); } @@ -369,9 +367,7 @@ function Controller() { setTimeout(loader.getNextTest, 10); }; - loader.onInitialized = function(totalTests, version, date) { - presenter.setVersion(version); - presenter.setDate(date); + loader.onInitialized = function(totalTests) { presenter.setTotalTests(totalTests); }; @@ -489,4 +485,11 @@ $(function () { $('.button-reset').click(function () { 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); + } + }); }); diff --git a/website/json/default.json b/website/json/default.json index d91f36e915..15021e6885 100644 --- a/website/json/default.json +++ b/website/json/default.json @@ -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"} \ No newline at end of file +{"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"]} \ No newline at end of file diff --git a/website/json/suiteDescrip.json b/website/json/suiteDescrip.json new file mode 100644 index 0000000000..570e6b99a4 --- /dev/null +++ b/website/json/suiteDescrip.json @@ -0,0 +1 @@ +{"date":"2012-03-28","version":"ES5.1"} \ No newline at end of file diff --git a/website/json/testcases_bestPractice.json b/website/json/testcases_bestPractice.json index a429694ce7..da21c035fe 100644 --- a/website/json/testcases_bestPractice.json +++ b/website/json/testcases_bestPractice.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":20,"testSuite":["json/bestPractice.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":20,"testSuite":["json/bestPractice.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch07.json b/website/json/testcases_ch07.json index 33be5f4ae0..b04e071744 100644 --- a/website/json/testcases_ch07.json +++ b/website/json/testcases_ch07.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":715,"testSuite":["json/ch07.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":715,"testSuite":["json/ch07.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch08.json b/website/json/testcases_ch08.json index 5a244180e0..8813692c9e 100644 --- a/website/json/testcases_ch08.json +++ b/website/json/testcases_ch08.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":182,"testSuite":["json/ch08.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":182,"testSuite":["json/ch08.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch09.json b/website/json/testcases_ch09.json index cc59a3ca37..70696b5e20 100644 --- a/website/json/testcases_ch09.json +++ b/website/json/testcases_ch09.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":128,"testSuite":["json/ch09.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":128,"testSuite":["json/ch09.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch10.json b/website/json/testcases_ch10.json index f45081b3db..c1b2021ad8 100644 --- a/website/json/testcases_ch10.json +++ b/website/json/testcases_ch10.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":372,"testSuite":["json/ch10.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":372,"testSuite":["json/ch10.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch11.json b/website/json/testcases_ch11.json index b31dd980fc..a59f31b3b2 100644 --- a/website/json/testcases_ch11.json +++ b/website/json/testcases_ch11.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":1320,"testSuite":["json/ch11.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":1320,"testSuite":["json/ch11.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch12.json b/website/json/testcases_ch12.json index 4a7e6c7eb0..55589344c3 100644 --- a/website/json/testcases_ch12.json +++ b/website/json/testcases_ch12.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":521,"testSuite":["json/ch12.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":521,"testSuite":["json/ch12.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch13.json b/website/json/testcases_ch13.json index 1db903eeb4..c19a8d74a1 100644 --- a/website/json/testcases_ch13.json +++ b/website/json/testcases_ch13.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":230,"testSuite":["json/ch13.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":230,"testSuite":["json/ch13.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch14.json b/website/json/testcases_ch14.json index 779e0e9c3d..ccaafa8532 100644 --- a/website/json/testcases_ch14.json +++ b/website/json/testcases_ch14.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":24,"testSuite":["json/ch14.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":24,"testSuite":["json/ch14.json"]} \ No newline at end of file diff --git a/website/json/testcases_ch15.json b/website/json/testcases_ch15.json index cf723e2f9d..73aedfae11 100644 --- a/website/json/testcases_ch15.json +++ b/website/json/testcases_ch15.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":8071,"testSuite":["json/ch15.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":8071,"testSuite":["json/ch15.json"]} \ No newline at end of file diff --git a/website/json/testcases_intl402.json b/website/json/testcases_intl402.json index 40567d4794..63d5a03ebd 100644 --- a/website/json/testcases_intl402.json +++ b/website/json/testcases_intl402.json @@ -1 +1 @@ -{"date":"2012-03-27","numTests":1,"testSuite":["json/intl402.json"],"version":"ES5.1"} \ No newline at end of file +{"numTests":1,"testSuite":["json/intl402.json"]} \ No newline at end of file