Re: kernel-tests: [PATCH] Add script shell wrapper to check if the wanted test was not tested for current version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From dda596d968b7e09d821d842129b38a2771f63ebb Mon Sep 17 00:00:00 2001
From: Charles-Antoine Couret <charles-antoine.couret@xxxxxxxxxxxx>
Date: Mon, 4 Apr 2016 10:34:33 +0200
Subject: [PATCH] Add script shell wrapper to check if the wanted test was not
 tested for current version.
 
It should avoid to verify that manually before executing the test
(or to execute twice the test which is useless).
 
Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@xxxxxxxxxxxx>
---
 kernel-tests.sh | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100755 kernel-tests.sh
 
diff --git a/kernel-tests.sh b/kernel-tests.sh
new file mode 100755
index 0000000..397264c
--- /dev/null
+++ b/kernel-tests.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if [ -z $1 ]; then
+    echo "You must provide a test name."
+    exit 1
+fi
+
+TEST=$1
+CURRENT_VERSION=$(uname -r)
+
+# Check if wanted test has been executed with current kernel version
+for file in logs/*; do
+    VERSION_TESTED=$(cat $file | sed -n 3p | cut -d ' ' -f 2)
+    TEST_EXECUTED=$(cat $file | sed -n 2p | cut -d ' ' -f 3)
+
+    if [ "$VERSION_TESTED" == "$CURRENT_VERSION" -a "$TEST_EXECUTED" == "$TEST" ]; then
+        echo "The current kernel was already tested with this test, abort."
+        exit 0
+    fi
+done
+
+./runtests.sh -t $TEST
-- 
2.5.5
_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux