summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-01-27 10:51:10 -0500
committerDavid Zeuthen <davidz@redhat.com>2009-01-27 10:51:10 -0500
commitf2f2f6db1ef8ea855737cff91d8876365b9b308d (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /test
parent20d7b8fe88fe39b68ed6622d63d6914678b6d0ec (diff)
downloadpolkit-f2f2f6db1ef8ea855737cff91d8876365b9b308d.tar.gz
prepare for merge of rewritten PolicyKit
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.am16
-rw-r--r--test/authdb-test/.gitignore0
-rw-r--r--test/authdb-test/lib/polkit-1/.gitignore0
-rw-r--r--test/authdb-test/misc/.gitignore0
-rw-r--r--test/authdb-test/run/polkit-1/.gitignore0
-rwxr-xr-xtest/create-coverage-report.sh64
-rw-r--r--test/invalid/test-invalid-1-action-id.policy14
-rw-r--r--test/invalid/test-invalid-2-bogus-any.policy14
-rw-r--r--test/invalid/test-invalid-3-bogus-inactive.policy14
-rw-r--r--test/invalid/test-invalid-4-bogus-active.policy14
-rw-r--r--test/invalid/test-invalid-5-max-depth.policy87
-rw-r--r--test/valid/test-valid-1.policy14
-rw-r--r--test/valid/test-valid-2-annotations.policy27
-rw-r--r--test/valid/test-valid-3-lang.policy28
-rw-r--r--test/valid/test-valid-4-unknown-tags.policy20
-rw-r--r--test/valid/test-valid-5-wrong-extension.policy~14
16 files changed, 0 insertions, 326 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index c062a69..0000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-
-EXTRA_DIST = \
- create-coverage-report.sh \
- invalid/test-invalid-1-action-id.policy \
- invalid/test-invalid-2-bogus-any.policy \
- invalid/test-invalid-3-bogus-inactive.policy \
- invalid/test-invalid-4-bogus-active.policy \
- invalid/test-invalid-5-max-depth.policy \
- valid/test-valid-1.policy \
- valid/test-valid-2-annotations.policy \
- valid/test-valid-3-lang.policy \
- valid/test-valid-4-unknown-tags.policy \
- valid/test-valid-5-wrong-extension.policy~
-
-clean-local :
- rm -f *~
diff --git a/test/authdb-test/.gitignore b/test/authdb-test/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/test/authdb-test/.gitignore
+++ /dev/null
diff --git a/test/authdb-test/lib/polkit-1/.gitignore b/test/authdb-test/lib/polkit-1/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/test/authdb-test/lib/polkit-1/.gitignore
+++ /dev/null
diff --git a/test/authdb-test/misc/.gitignore b/test/authdb-test/misc/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/test/authdb-test/misc/.gitignore
+++ /dev/null
diff --git a/test/authdb-test/run/polkit-1/.gitignore b/test/authdb-test/run/polkit-1/.gitignore
deleted file mode 100644
index e69de29..0000000
--- a/test/authdb-test/run/polkit-1/.gitignore
+++ /dev/null
diff --git a/test/create-coverage-report.sh b/test/create-coverage-report.sh
deleted file mode 100755
index 68ce8f6..0000000
--- a/test/create-coverage-report.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-TOTAL_ACTUAL=0
-TOTAL_COVERED=0
-TOTAL_SOURCE=0
-
-P=$(dirname $0)/..
-
-MODULE=$1
-shift
-
-
-echo "=============================================================================="
-echo "Test coverage for $MODULE:"
-echo "=============================================================================="
-
-while [ $# -gt 0 ] ; do
- SOURCE=`cat $P/$1 |wc -l`
- TOTAL_SOURCE=$(($TOTAL_SOURCE + $SOURCE))
-
- echo -n "$1"
-
- n=${#1}
- while [ $n -lt 55 ] ; do
- echo -n " "
- n=$(($n + 1))
- done
-
- echo -n " : "
-
- if [ -e $P/$1.gcov ] ; then
- ACTUAL=`grep -v " -:" $P/$1.gcov |wc -l`
- NOT_COVERED=`grep " #####:" $P/$1.gcov |wc -l`
- COVERED=$(($ACTUAL - $NOT_COVERED))
- PERCENT=$((100 * $COVERED / $ACTUAL))
-
- TOTAL_ACTUAL=$(($TOTAL_ACTUAL + $ACTUAL))
- TOTAL_COVERED=$(($TOTAL_COVERED + $COVERED))
-
- if [ $PERCENT -lt 10 ] ; then
- echo -n " $PERCENT%"
- elif [ $PERCENT -lt 100 ] ; then
- echo -n " $PERCENT%"
- else
- echo -n "100%"
- fi
-
- echo " ($COVERED of $ACTUAL)"
-
- else
- echo " 0% (not tested)"
- fi
-
- shift
-done
-
-TOTAL_PERCENT=$((100 * $TOTAL_COVERED / $TOTAL_ACTUAL))
-
-echo
-echo "Source lines : $TOTAL_SOURCE"
-echo "Actual statements : $TOTAL_ACTUAL"
-echo "Executed statements : $TOTAL_COVERED"
-echo "Test coverage : $TOTAL_PERCENT%"
-echo
diff --git a/test/invalid/test-invalid-1-action-id.policy b/test/invalid/test-invalid-1-action-id.policy
deleted file mode 100644
index 0875d5f..0000000
--- a/test/invalid/test-invalid-1-action-id.policy
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="4org.example.invalid1">
- <description>foo</description>
- <message>bar</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
diff --git a/test/invalid/test-invalid-2-bogus-any.policy b/test/invalid/test-invalid-2-bogus-any.policy
deleted file mode 100644
index 529e2c5..0000000
--- a/test/invalid/test-invalid-2-bogus-any.policy
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.invalid2">
- <description>foo</description>
- <message>bar</message>
- <defaults>
- <allow_any>_bogus_</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
diff --git a/test/invalid/test-invalid-3-bogus-inactive.policy b/test/invalid/test-invalid-3-bogus-inactive.policy
deleted file mode 100644
index 555976d..0000000
--- a/test/invalid/test-invalid-3-bogus-inactive.policy
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.invalid3">
- <description>foo</description>
- <message>bar</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>_bogus_</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
diff --git a/test/invalid/test-invalid-4-bogus-active.policy b/test/invalid/test-invalid-4-bogus-active.policy
deleted file mode 100644
index 0f82e7b..0000000
--- a/test/invalid/test-invalid-4-bogus-active.policy
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.invalid4">
- <description>foo</description>
- <message>bar</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>_bogus_</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
diff --git a/test/invalid/test-invalid-5-max-depth.policy b/test/invalid/test-invalid-5-max-depth.policy
deleted file mode 100644
index 1dd1520..0000000
--- a/test/invalid/test-invalid-5-max-depth.policy
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- <future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
- </future>
-
- <action id="org.example.invalid5">
- <description>foo</description>
- <message>bar</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
diff --git a/test/valid/test-valid-1.policy b/test/valid/test-valid-1.policy
deleted file mode 100644
index 24bd602..0000000
--- a/test/valid/test-valid-1.policy
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.valid1">
- <description>example</description>
- <message>example</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
diff --git a/test/valid/test-valid-2-annotations.policy b/test/valid/test-valid-2-annotations.policy
deleted file mode 100644
index 3fbfd33..0000000
--- a/test/valid/test-valid-2-annotations.policy
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.valid2">
- <description>example 2</description>
- <message>message 2</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- <annotate key="the.key1">Some Value 1</annotate>
- <annotate key="the.key2">Some Value 2</annotate>
- </action>
-
- <action id="org.example.valid2b">
- <description>example 2</description>
- <message>message 2</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- <annotate key="the.key1">Some Value 1b</annotate>
- </action>
-
-</policyconfig>
diff --git a/test/valid/test-valid-3-lang.policy b/test/valid/test-valid-3-lang.policy
deleted file mode 100644
index c13bd14..0000000
--- a/test/valid/test-valid-3-lang.policy
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.valid3">
- <description>example</description>
- <message>message</message>
- <description xml:lang="da">example (danish)</description>
- <message xml:lang="da">message (danish)</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
- <action id="org.example.valid3b">
- <description>example 2</description>
- <message>message 2</message>
- <description xml:lang="da">example 2 (danish)</description>
- <message xml:lang="da">message 2 (danish)</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
-</policyconfig>
diff --git a/test/valid/test-valid-4-unknown-tags.policy b/test/valid/test-valid-4-unknown-tags.policy
deleted file mode 100644
index af0ba07..0000000
--- a/test/valid/test-valid-4-unknown-tags.policy
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.valid4">
- <description>example</description>
- <message>example</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- <future_tag>
- <future_tag2/>
- <future_tag3>
- <future_tag4/>
- </future_tag3>
- </future_tag>
- </action>
-
-</policyconfig>
diff --git a/test/valid/test-valid-5-wrong-extension.policy~ b/test/valid/test-valid-5-wrong-extension.policy~
deleted file mode 100644
index 24bd602..0000000
--- a/test/valid/test-valid-5-wrong-extension.policy~
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<policyconfig>
-
- <action id="org.example.valid1">
- <description>example</description>
- <message>example</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep_always</allow_active>
- </defaults>
- </action>
-
-</policyconfig>