Test default compare in global status page
Make run for profile report older so that the global status page uses
another run.
Reviewed By: cmatthews
Differential Revision: https://reviews.llvm.org/D87235
diff --git a/tests/server/ui/Inputs/last-run-report.json b/tests/server/ui/Inputs/last-run-report.json
new file mode 100644
index 0000000..45865e7
--- /dev/null
+++ b/tests/server/ui/Inputs/last-run-report.json
@@ -0,0 +1,38 @@
+{
+ "generated_by": "LNT Server v0.4.2.dev0",
+ "machine": {
+ "id": 4,
+ "name": "e105293.local__clang_DEV__x86_64"
+ },
+ "run": {
+ "start_time": "2020-09-11T12:01:10",
+ "end_time": "2020-09-11T12:02:19",
+ "order_by": "llvm_project_revision",
+ "llvm_project_revision": "154338",
+ "tag": "nts"
+ },
+ "tests": [
+ {
+ "name": "unique-name-wreodfpj",
+ "compile_status": "0",
+ "compile_time": "1.3",
+ "execution_status": "0",
+ "execution_time": "1.4",
+ "hash_status": "0",
+ "hash": "fedcba",
+ "score": 18,
+ "code_size": 10126
+ },
+ {
+ "name": "unique-name-lowrf",
+ "compile_status": "0",
+ "compile_time": "1.3",
+ "execution_status": "0",
+ "execution_time": "1.4",
+ "hash_status": "0",
+ "hash": "fedcba",
+ "score": 18,
+ "code_size": 10126
+ }
+ ]
+}
diff --git a/tests/server/ui/V4Pages.py b/tests/server/ui/V4Pages.py
index 7762344..a347c10 100644
--- a/tests/server/ui/V4Pages.py
+++ b/tests/server/ui/V4Pages.py
@@ -12,6 +12,11 @@
# Import a profile
# RUN: lnt import %t.instance %{shared_inputs}/profile-report.json
#
+# Import last run. The run in this report must be the most recent one and the
+# tests inside unique to test the comparator used when sorting the tests per
+# regression status in the global status page.
+# RUN: lnt import %t.instance %S/Inputs/last-run-report.json
+#
# RUN: lnt import %t.instance %S/Inputs/sample-failed-report1.json
# RUN: lnt import %t.instance %S/Inputs/sample-failed-report2.json
#