File: test.sh

package info (click to toggle)
fcm 2021.05.01-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,788 kB
  • sloc: perl: 26,014; sh: 10,510; javascript: 4,043; f90: 774; python: 294; ansic: 29; makefile: 14; cpp: 5
file content (38 lines) | stat: -rwxr-xr-x 773 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

echo "### Fortran compiler tests"
for fc in \
  "ifort" \
  "ifort -assume nosource_include" \
  "gfortran" \
  "gfortran -I-"
do
  echo
  echo "Compiler: $fc"
  echo "Fortran include test:"
  $fc -o test.o -I$PWD/inc -c prog/test_fortran_inc.f90
  $fc -o test.exe test.o
  test.exe
  rm test.exe test.o
  echo "CPP include test:"
  $fc -o test.o -I$PWD/inc -c prog/test_prepro_inc.F90
  $fc -o test.exe test.o
  test.exe
  rm test.exe test.o
done

echo
echo "### Preprocessor tests"
fc=gfortran
for cpp in \
  "cpp -P -traditional" \
  "cpp -P -traditional -I-"
do
  echo
  echo "Pre-processor: $cpp"
  $cpp -I$PWD/inc prog/test_prepro_inc.F90 >tmp.f90
  $fc -o test.o -I$PWD/inc -c tmp.f90
  $fc -o test.exe test.o
  test.exe
  rm test.exe test.o tmp.f90
done