File: missing-from-testlist.sh

package info (click to toggle)
libreswan 5.2-2.3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 81,644 kB
  • sloc: ansic: 129,988; sh: 32,018; xml: 20,646; python: 10,303; makefile: 3,022; javascript: 1,506; sed: 574; yacc: 511; perl: 264; awk: 52
file content (42 lines) | stat: -rwxr-xr-x 907 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh

# hack to print the test directories that don't appear in TESTLIST.

nf=18
df=10

{
    # use anything kvm things is a test directory
    ./testing/utils/kvmresults.py testing/pluto/*/ \
	--skip '' \
	--print test-name
} | {
    # filter out any in TESTLIST
    while read t ; do
	grep "[^a-z0-9]$t[^-a-z0-9]" testing/pluto/TESTLIST > /dev/null || echo $t
    done
} | {
    # augment each test with author et.al.
    while read t ; do
	h=$(git log --format="%h" testing/pluto/$t | tail -1)
	d=$(git log --date=short --format="%ad" $h -- testing/pluto/$t)
	n=$(git log --format="%an" $h -- testing/pluto/$t)
	echo ${n}:${d}:${h}:${t}
    done
} | {
    # sort by name then date
    sort -t : -k 1,1 -k 2,2V
} | {
    # pretty print
    IFS=:
    pn=
    while read n d h t ; do
	if test "${pn}" != "${n}" ; then
	    echo
	    echo "$n"
	    echo
	    pn=${n}
	fi
	echo ${d} ${h} ${t}
    done
}