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

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

Testing : renamed build directories + minor fixes

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