source: configs/testing/bash/post.sh @ 510

Last change on this file since 510 was 510, checked in by dubos, 7 years ago

updates to testing

File size: 1.9 KB
Line 
1B1;2c#!/bin/bash
2
3function to_latex() {
4echo $1 | sed 's/_/\\_/g'
5}
6
7function svn_info() {
8    cd $1
9    svn info | grep URL
10    echo '\\'
11    svn info | grep Revision
12    echo '\\'
13}
14
15function abstract()
16{
17    cd $ROOT
18    hostname ; echo '\\'
19    pwd ; echo '\\'
20    svn_info $ROOT/XIOS
21    svn_info $ROOT/DYNAMICO
22    svn_info $ROOT
23}
24
25function all_results()
26{
27    cd $ROOT/RUNS
28    for TEST in * ; do
29        NAME=$(to_latex $TEST)
30        echo "\subsection{$NAME}"
31        for GRAPH in $(ls $TEST/*.png) ; do
32            cat <<EOF
33\begin{figure}
34\centering{}
35\includegraphics[scale=0.5]{$ROOT/RUNS/$GRAPH}
36\caption{$NAME}
37\end{figure}
38EOF
39        done
40        echo '\newpage{}'
41    done
42#    cd $ROOT/tmp
43}
44
45function all_params()
46{
47    cd $ROOT/RUNS
48    for TEST in * ; do
49        NAME=$(to_latex $TEST)
50        cat <<EOF
51\subsection{$NAME}
52\begin{lstlisting}
53$(cat $TEST/run.def)
54\end{lstlisting}
55EOF
56    done
57#    cd $ROOT/tmp
58}
59
60ROOT=$PWD
61
62for dir in $ROOT/RUNS/* ; do
63    cd $dir
64    echo
65    pwd
66    ls -l post.py netcdf
67    python post.py &
68done
69wait
70
71cd $ROOT/tmp
72rm -f *.aux *.log *.toc *.tex
73
74cat <<EOF >report.tex
75\documentclass[10pt,a4paper,english]{article}
76\usepackage{graphicx}
77\usepackage{listings}
78\usepackage[T1]{fontenc}
79\usepackage[latin9]{inputenc}
80\usepackage{color}
81\usepackage{babel}
82\usepackage[unicode=true,pdfusetitle,
83 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
84 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=true]
85 {hyperref}
86\usepackage{geometry}
87\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
88
89\begin{document}
90
91\title{DYNAMICO correctness report ($arch)}
92\date{}
93\author{Thomas Dubos}
94\maketitle
95
96\begin{abstract}
97$(abstract)
98\end{abstract}
99
100\tableofcontents{}
101\section{Results}
102$(all_results)
103
104\twocolumn
105
106\section{Parameters}
107$(all_params)
108\end{document}
109EOF
110
111pdflatex -interaction=batchmode report.tex
112pdflatex -interaction=batchmode report.tex
113mailx -s "DYNAMICO correctness report " -a report.pdf dubos@lmd.polytechnique.fr </dev/null
Note: See TracBrowser for help on using the repository browser.