File: xc-reset-regression-fail

package info (click to toggle)
libxc 5.2.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 196,988 kB
  • sloc: ansic: 31,506; f90: 3,369; perl: 1,392; python: 966; makefile: 425; sh: 318
file content (58 lines) | stat: -rwxr-xr-x 1,349 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

if [ -z "$srcdir" ]; then
  srcdir="./"
fi

if [ -z "$builddir" ]; then
  builddir="./"
fi

funcs=$*
if [ "x$funcs" = "x" ]; then
  funcs=$(awk '{print tolower($2)}' ${builddir}../src/xc_funcs.h | sed 's/^xc_//g')
fi

if [ ! -f $builddir/test-suite.log ]; then
  echo "Did not find $builddir/test-suite.log"
  exit
fi

for func in $funcs; do
  dir=${func%%_*}
  tmp=${func//${dir}_/}
  if [ "x$dir" = "xhyb" ]; then
    dir=${dir}_${tmp%%_*}
    tmp=${func//${dir}_/}
  fi
  dir=${dir}_${tmp%%_*}

  while read -r lixo lixo2 system nspin type rest; do
    if [ "x$nspin" = "x1" ]; then
      spin=unpol
    else
      spin=pol
    fi

    if [ "x$type" = "xexc" ]; then
      order=0
    elif [ "x$type" = "xvxc" ]; then
      order=1
    else
      order=2
    fi

    refname=$func.$system.$spin.$order

    echo "processing $refname"

    $builddir/xc-regression $func $nspin $order $srcdir/input/$system $srcdir/regression/$dir/$refname > /dev/null
    rm -f $srcdir/regression/$dir/$refname.bz2
    bzip2 $srcdir/regression/$dir/$refname
        
  done < <(grep " \* $func\s" $builddir/test-suite.log | grep -v "OK")
done