[test-suite] Register result codes with lit.

lit currently only has a hard-coded set of result codes and crashes
when encountering test-suite's NOEXE result code. D78164 adds the
possibility to register custom result codes.

This patch registers the result code NOEXE and renames SKIPPED to
NOCHANGE since lit already has a SKIPPED result code.

While this does not fix any buildbot (such as
http://lab.llvm.org:8011/builders/clang-native-arm-lnt-perf), it at
least should allow lit to display which tests have failed at the end.

Reviewed By: yln, jdoerfert

Differential Revision: https://reviews.llvm.org/D79064
diff --git a/litsupport-tests/hash/check/lit.out b/litsupport-tests/hash/check/lit.out
index e06a3f7..416ac33 100644
--- a/litsupport-tests/hash/check/lit.out
+++ b/litsupport-tests/hash/check/lit.out
@@ -1,3 +1,3 @@
-CHECK-DAG: SKIPPED: test-suite :: tests/skip.test
+CHECK-DAG: NOCHANGE: test-suite :: tests/unchanged.test
 CHECK-DAG: PASS: test-suite :: tests/normal.test
 CHECK: Expected Passes
diff --git a/litsupport-tests/hash/previous.json b/litsupport-tests/hash/previous.json
index 7f1663f..9eed150 100644
--- a/litsupport-tests/hash/previous.json
+++ b/litsupport-tests/hash/previous.json
@@ -12,7 +12,7 @@
       "metrics": {
         "hash": "5dbd958d0108aca7182edcc98225739b"
       }, 
-      "name": "test-suite :: tests/skip.test", 
+      "name": "test-suite :: tests/nochange.test",
       "output": "\ntests/foo.sh"
     }
   ]
diff --git a/litsupport-tests/hash/tests/skip.test b/litsupport-tests/hash/tests/nochange.text
similarity index 100%
rename from litsupport-tests/hash/tests/skip.test
rename to litsupport-tests/hash/tests/nochange.text
diff --git a/litsupport/test.py b/litsupport/test.py
index 0864d32..86ca6c6 100644
--- a/litsupport/test.py
+++ b/litsupport/test.py
@@ -13,9 +13,11 @@
 import os
 
 
-SKIPPED = lit.Test.ResultCode('SKIPPED', False)
-NOEXE = lit.Test.ResultCode('NOEXE', True)
+NOCHANGE = lit.Test.ResultCode('NOCHANGE', False)
+lit.main.add_result_category(NOCHANGE, "Executable Unchanged")
 
+NOEXE = lit.Test.ResultCode('NOEXE', True)
+lit.main.add_result_category(NOEXE, "Executable Missing")
 
 class TestSuiteTest(lit.formats.ShTest):
     def __init__(self):
@@ -46,7 +48,7 @@
             litsupport.modules.hash.compute(context)
             if litsupport.modules.hash.same_as_previous(context):
                 result = lit.Test.Result(
-                        SKIPPED, 'Executable identical to previous run')
+                        NOCHANGE, 'Executable identical to previous run')
                 val = lit.Test.toMetricValue(context.executable_hash)
                 result.addMetric('hash', val)
                 return result