summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fugate <dfugate@microsoft.com>2012-03-28 16:05:03 -0700
committerDavid Fugate <dfugate@microsoft.com>2012-03-28 16:05:03 -0700
commitafe922204db8194742c0675f070fa89b0133db61 (patch)
treee5d2181272ef37853132888a99370769083cda7d
parent58ac812e6fd4817ea3a7f1a84669d9e55ef43dae (diff)
downloadtest262-afe922204db8194742c0675f070fa89b0133db61.tar.gz
https://bugs.ecmascript.org/show_bug.cgi?id=65 fixed.
-rw-r--r--test/harness/sth.js15
-rw-r--r--tools/packaging/packager.py12
-rw-r--r--website/harness/sth.js15
-rw-r--r--website/json/default.json2
-rw-r--r--website/json/suiteDescrip.json1
-rw-r--r--website/json/testcases_bestPractice.json2
-rw-r--r--website/json/testcases_ch07.json2
-rw-r--r--website/json/testcases_ch08.json2
-rw-r--r--website/json/testcases_ch09.json2
-rw-r--r--website/json/testcases_ch10.json2
-rw-r--r--website/json/testcases_ch11.json2
-rw-r--r--website/json/testcases_ch12.json2
-rw-r--r--website/json/testcases_ch13.json2
-rw-r--r--website/json/testcases_ch14.json2
-rw-r--r--website/json/testcases_ch15.json2
-rw-r--r--website/json/testcases_intl402.json2
16 files changed, 38 insertions, 29 deletions
diff --git a/test/harness/sth.js b/test/harness/sth.js
index 029a2cff0..91656937c 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 3e3a787a4..174174898 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 029a2cff0..91656937c 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 d91f36e91..15021e688 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 000000000..570e6b99a
--- /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 a429694ce..da21c035f 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 33be5f4ae..b04e07174 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 5a244180e..8813692c9 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 cc59a3ca3..70696b5e2 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 f45081b3d..c1b2021ad 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 b31dd980f..a59f31b3b 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 4a7e6c7eb..55589344c 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 1db903eeb..c19a8d74a 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 779e0e9c3..ccaafa853 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 cf723e2f9..73aedfae1 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 40567d479..63d5a03eb 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