1#!/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/.. 8top_srcdir="$(cd $(dirname $0)/..; pwd)" 9 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= 35 cat <<EOF 36$a 37EOF 38 fi 39done 40 41echo 42echo ' }' 43echo '}' 44