📄 runtests.in
字号:
#! /bin/sh## Tests for mpicc, mpiCC, mpif77 (.F) and mpif90 (.F90)# -Dname=\"foo bar\"# -Dname='"foo bar"'# mpicc="@MPICC@"mpiCC="@MPICPLUSPLUS@"mpif77="@MPIF77@"mpif90="@MPIF90@"# Create test filestrap 'rm -f a.out rtest* *.o' 0cat >> rtest.c <<EOF#include <stdio.h>int main( int argc, char *argv[] ){ printf( testname ); return 0;}EOFcat >> rtest.f <<EOF program main print *, testname endEOFcat >> rtest.cc <<EOF#include <iostream.h>int main( int argc, char *argv[] ){ cout << testname; return 0;}EOFoutlog="/dev/null"cmd=mpiccif $mpicc -Dtestname=\"foo\" rtest.c > $outlog 2>&1 ; then :else echo "Error with escaped double quotes in $cmd"fiif $mpicc -Dtestname='"foo bar"' rtest.c > $outlog 2>&1 ; then :else echo "Error with double inside of single quotes in $cmd"fi# Run this test only if mpiCC is valid (if [ "@HAS_CXX@" = "yes" ] ; then cmd=mpiCC if $mpiCC -Dtestname=\"foo\" rtest.cc > $outlog 2>&1; then : else echo "Error with escaped double quotes in $cmd" fi if $mpiCC -Dtestname='"foo bar"' rtest.cc > $outlog 2>&1 ; then : else echo "Error with double inside of single quotes in $cmd" fifi## No tests for Fortran yet since we don't directly support .F or .F90.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -