Blame SOURCES/0048-Clearly-state-that-tests-cannot-be-run-under-root.patch

6d9473
From 28898821ebdacf361ee6b87a49702ff4e94d6110 Mon Sep 17 00:00:00 2001
6d9473
From: Jakub Filak <jfilak@redhat.com>
6d9473
Date: Mon, 13 Jul 2015 15:36:20 +0200
6d9473
Subject: [PATCH] Clearly state that tests cannot be run under root
6d9473
6d9473
Related to #1259309
6d9473
6d9473
Signed-off-by: Jakub Filak <jfilak@redhat.com>
6d9473
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
6d9473
6d9473
Conflicts:
6d9473
	README
6d9473
---
6d9473
 Makefile |  2 +-
6d9473
 README   | 18 ++++++++++++++++++
6d9473
 2 files changed, 19 insertions(+), 1 deletion(-)
6d9473
6d9473
diff --git a/Makefile b/Makefile
6d9473
index 2e20217..5c51128 100644
6d9473
--- a/Makefile
6d9473
+++ b/Makefile
6d9473
@@ -60,4 +60,4 @@ distclean:
6d9473
 
6d9473
 .PHONY: check
6d9473
 check: build
6d9473
-	cd $(OUT_DIR) && make test
6d9473
+	if [ "_0" != "_$$(id -u)" ]; then cd $(OUT_DIR) && make test; else echo "Cannot run tests under root user."; exit 1; fi
6d9473
diff --git a/README b/README
6d9473
index 590db7e..abbf3aa 100644
6d9473
--- a/README
6d9473
+++ b/README
6d9473
@@ -86,3 +86,21 @@ $  java -agentlib:abrt-java-connector=executable=threadclass $MyClass -platform.
6d9473
 
6d9473
 - 'mainclass' is used when 'executable' option is not passed and 'executable'
6d9473
   file is filled with full path $MyClass
6d9473
+
6d9473
+Building from sources
6d9473
+---------------------
6d9473
+
6d9473
+This project uses CMake build system but a Makefile for GNU Make, which defines
6d9473
+all the targets you usually need to run, is also provided.
6d9473
+
6d9473
+$ make build
6d9473
+$ make run
6d9473
+$ make check
6d9473
+$ make rpm
6d9473
+$ make distclean
6d9473
+
6d9473
+All build results are stored in ./bin directory.
6d9473
+
6d9473
+The `check' make target will fail if you run it under root user. There are some
6d9473
+test cases that try to generate 'File Access Denied' exceptions and the easiest
6d9473
+way to achieve that is to try to access a root's file.
6d9473
-- 
6d9473
1.8.3.1
6d9473