summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/libtest-json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make-fulldeps/libtest-json')
-rw-r--r--tests/run-make-fulldeps/libtest-json/Makefile18
-rw-r--r--tests/run-make-fulldeps/libtest-json/f.rs22
-rw-r--r--tests/run-make-fulldeps/libtest-json/output-default.json10
-rw-r--r--tests/run-make-fulldeps/libtest-json/output-stdout-success.json10
-rwxr-xr-xtests/run-make-fulldeps/libtest-json/validate_json.py8
5 files changed, 0 insertions, 68 deletions
diff --git a/tests/run-make-fulldeps/libtest-json/Makefile b/tests/run-make-fulldeps/libtest-json/Makefile
deleted file mode 100644
index 37b6cb9e2..000000000
--- a/tests/run-make-fulldeps/libtest-json/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-include ../tools.mk
-
-# Test expected libtest's JSON output
-
-OUTPUT_FILE_DEFAULT := $(TMPDIR)/libtest-json-output-default.json
-OUTPUT_FILE_STDOUT_SUCCESS := $(TMPDIR)/libtest-json-output-stdout-success.json
-
-all: f.rs validate_json.py output-default.json output-stdout-success.json
- $(RUSTC) --test f.rs
- RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=json > $(OUTPUT_FILE_DEFAULT) || true
- RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=json --show-output > $(OUTPUT_FILE_STDOUT_SUCCESS) || true
-
- cat $(OUTPUT_FILE_DEFAULT) | "$(PYTHON)" validate_json.py
- cat $(OUTPUT_FILE_STDOUT_SUCCESS) | "$(PYTHON)" validate_json.py
-
- # Normalize the actual output and compare to expected output file
- cat $(OUTPUT_FILE_DEFAULT) | sed 's/"exec_time": [0-9.]*/"exec_time": $$TIME/' | diff output-default.json -
- cat $(OUTPUT_FILE_STDOUT_SUCCESS) | sed 's/"exec_time": [0-9.]*/"exec_time": $$TIME/' | diff output-stdout-success.json -
diff --git a/tests/run-make-fulldeps/libtest-json/f.rs b/tests/run-make-fulldeps/libtest-json/f.rs
deleted file mode 100644
index edfe25086..000000000
--- a/tests/run-make-fulldeps/libtest-json/f.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-#[test]
-fn a() {
- println!("print from successful test");
- // Should pass
-}
-
-#[test]
-fn b() {
- assert!(false);
-}
-
-#[test]
-#[should_panic]
-fn c() {
- assert!(false);
-}
-
-#[test]
-#[ignore = "msg"]
-fn d() {
- assert!(false);
-}
diff --git a/tests/run-make-fulldeps/libtest-json/output-default.json b/tests/run-make-fulldeps/libtest-json/output-default.json
deleted file mode 100644
index ad22b66ed..000000000
--- a/tests/run-make-fulldeps/libtest-json/output-default.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{ "type": "suite", "event": "started", "test_count": 4 }
-{ "type": "test", "event": "started", "name": "a" }
-{ "type": "test", "name": "a", "event": "ok" }
-{ "type": "test", "event": "started", "name": "b" }
-{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'b' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
-{ "type": "test", "event": "started", "name": "c" }
-{ "type": "test", "name": "c", "event": "ok" }
-{ "type": "test", "event": "started", "name": "d" }
-{ "type": "test", "name": "d", "event": "ignored", "message": "msg" }
-{ "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": $TIME }
diff --git a/tests/run-make-fulldeps/libtest-json/output-stdout-success.json b/tests/run-make-fulldeps/libtest-json/output-stdout-success.json
deleted file mode 100644
index ec98172eb..000000000
--- a/tests/run-make-fulldeps/libtest-json/output-stdout-success.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{ "type": "suite", "event": "started", "test_count": 4 }
-{ "type": "test", "event": "started", "name": "a" }
-{ "type": "test", "name": "a", "event": "ok", "stdout": "print from successful test\n" }
-{ "type": "test", "event": "started", "name": "b" }
-{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'b' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
-{ "type": "test", "event": "started", "name": "c" }
-{ "type": "test", "name": "c", "event": "ok", "stdout": "thread 'c' panicked at 'assertion failed: false', f.rs:15:5\n" }
-{ "type": "test", "event": "started", "name": "d" }
-{ "type": "test", "name": "d", "event": "ignored", "message": "msg" }
-{ "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": $TIME }
diff --git a/tests/run-make-fulldeps/libtest-json/validate_json.py b/tests/run-make-fulldeps/libtest-json/validate_json.py
deleted file mode 100755
index 657f732f2..000000000
--- a/tests/run-make-fulldeps/libtest-json/validate_json.py
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import json
-
-# Try to decode line in order to ensure it is a valid JSON document
-for line in sys.stdin:
- json.loads(line)