blob: 79011bc10c8fcf01efcd723ea7d0f6cdcdff5b47 [file] [log] [blame]
Cyril Hrubisa069cd32020-10-05 15:30:46 +02001#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2019 Cyril Hrubis <chrubis@suse.cz>
4# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
5set -e
6
7top_builddir=$PWD/..
Petr Vorel327cff72020-12-17 13:08:47 +01008top_srcdir="$(cd $(dirname $0)/..; pwd)"
Cyril Hrubisa069cd32020-10-05 15:30:46 +02009
10cd $top_srcdir
11
12version=$(cat $top_srcdir/VERSION)
13if [ -d .git ]; then
14 version=$(git describe 2>/dev/null) || version=$(cat $top_srcdir/VERSION).GIT-UNKNOWN
15fi
16
17echo '{'
18echo ' "testsuite": "Linux Test Project",'
19echo ' "testsuite_short": "LTP",'
20echo ' "url": "https://github.com/linux-test-project/ltp/",'
21echo ' "scm_url_base": "https://github.com/linux-test-project/ltp/tree/master/",'
22echo ' "timeout": 300,'
23echo " \"version\": \"$version\","
24echo ' "tests": {'
25
26first=1
27
28for test in `find testcases/ -name '*.c'`; do
29 a=$($top_builddir/docparse/docparse "$test")
30 if [ -n "$a" ]; then
31 if [ -z "$first" ]; then
32 echo ','
33 fi
34 first=
Petr Vorela7e7a902020-12-17 12:53:33 +010035 cat <<EOF
36$a
37EOF
Cyril Hrubisa069cd32020-10-05 15:30:46 +020038 fi
39done
40
41echo
42echo ' }'
43echo '}'