Commit 49d75ba6 authored by Arpad Lovassy's avatar Arpad Lovassy
Browse files

removed unused python scripts


Signed-off-by: Arpad Lovassy's avatarzlovarp <arpad.lovassy@semcon.com>
parent 3017cb68
##############################################################################
# Copyright (c) 2000-2017 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Balasko, Jeno
# Pandi, Krisztian
#
##############################################################################
import datetime
from tempfile import mkstemp
from shutil import move
from os import remove, close
from subprocess import call
from sys import exit
def getnumberfromfileline(line):
lineasstring = str(line);
numberfromfile = lineasstring[-3:];
number = int(numberfromfile) + 1;
print number;
if number >= 99:
print 'Number is over the limit: >=99. File is not modified!'
exit();
return number
def replace(file_path):
#Create temp file
fh, abs_path = mkstemp()
new_file = open(abs_path,'w')
old_file = open(file_path)
for line in old_file:
if '#define TTCN3_PATCHLEVEL' in line:
newline = str('#define TTCN3_PATCHLEVEL ') + str(getnumberfromfileline(line)) + str('\n');
new_file.write(newline);
elif '#define TTCN3_VERSION 30' in line:
number = getnumberfromfileline(line);
if number <= 9:
newline = str('#define TTCN3_VERSION 302') +'0' + str(number) + str('\n');
else:
newline = str('#define TTCN3_VERSION 302') + str(number) + str('\n');
new_file.write(newline);
else:
new_file.write(line)
#close temp file
new_file.close()
close(fh)
old_file.close()
#Remove original file
remove(file_path)
#Move new file
move(abs_path, file_path)
#( d.isoweekday() in range(1, 6)
#d = datetime.datetime.now();
#if d.isoweekday() == 2 or d.isoweekday() == 4 :
replace ("version.h");
#call(["git", "commit", "-m 'TTCN3_PATCHLEVEL update'" ,"version.h"]);
# call(["git", "push"]);
#!/bin/bash -x
# Basic configuration for `esekilxxen1843' (147.214.13.100).
SS7_HOME=/mnt/common_store/tools/EIN/linux64
EIN_DIR=${SS7_HOME}
OSS_DIR=/mnt/TTCN/Tools/OSS/linux-glibc2.3-amd64/8.5.0
SEA_DIR=/mnt/common_store/tools/SEA/linux64
GLIB_DIR=/usr
SCTP_DIR=/usr
if [ x`uname -s` = "xSunOS" ]; then
PATH=/proj/TTCN/Tools/libxml2-2.7.8/bin:/app/expect/5.42/bin:/proj/TTCN/Tools/grep-2.9/bin:/proj/TTCN/Tools/perl-5.10.1/bin:/proj/TTCN/Tools/tar-1.25/bin:/proj/TTCN/Tools/make-3.82/bin:/usr/bin:/bin:${PATH}
LD_LIBRARY_PATH=${SS7_HOME}/lib64:${SEA_DIR}/lib:${OSS_DIR}/lib:/usr/lib64:${LD_LIBRARY_PATH}
else
PATH=/app/libxml/2.7.7/LMWP2/bin:/usr/bin:/bin:${PATH}
LD_LIBRARY_PATH=/app/libxml/2.7.7/LMWP2/lib:${SS7_HOME}/lib64:${SEA_DIR}/lib:${OSS_DIR}/lib:/usr/lib64:${LD_LIBRARY_PATH}
fi
TTCN3_LICENSE_FILE=/home/titanrt/license_8706.dat
CVSROOT=:ext:titanrt@esekilx5008.rnd.ki.sw.ericsson.se:/proj/TTCN/cvs_root
CVS_SERVER=/usr/bin/cvs
CVS_RSH=ssh
EDITOR=mcedit
MODULEPATH=/app/TITAN/modules:/proj/TTCN/modules:/app/modules/0/modulefiles:/home/titanrt/.afs/0/rmodules:/home/titanrt/.afs/0/pmodules:/env/seki/modules:/home/titanrt/.afs/0/imodules:/env/common/modules
JAVA_HOME=/app/jdk/1.6.0_30/LMWP3
# For HUB access.
TCCLAB1_IP=159.107.194.73
TCCLAB2_IP=159.107.194.76
TCCLAB3_IP=159.107.194.74
TCCLAB5_IP=159.107.194.75
export JAVA_HOME TTCN3_LICENSE_FILE CVSROOT CVS_SERVER CVS_RSH EDITOR OSS_DIR SEA_DIR PATH LD_LIBRARY_PATH EIN_DIR SS7_HOME TCCLAB1_IP TCCLAB2_IP TCCLAB3_IP TCCLAB5_IP MODULEPATH
eval `/app/modules/0/bin/modulecmd bash add cvs`
eval `/app/modules/0/bin/modulecmd bash add expect`
eval `/app/modules/0/bin/modulecmd bash add TCCENV`
eval `/app/modules/0/bin/modulecmd bash add libxml`
#!/bin/bash -x
# Basic configuration for `esekits1064' (147.214.15.101).
SS7_HOME=/mnt/common_store/tools/EIN/linux64
EIN_DIR=${SS7_HOME}
OSS_DIR=/mnt/TTCN/Tools/OSS/linux-glibc2.3-amd64/8.5.0
SEA_DIR=/mnt/common_store/tools/SEA/linux64
GLIB_DIR=/usr
SCTP_DIR=/usr
PATH=/usr/bin:/bin:${PATH}
LD_LIBRARY_PATH=${SS7_HOME}/lib64:${SEA_DIR}/lib:${OSS_DIR}/lib:/usr/lib64:${LD_LIBRARY_PATH}
TTCN3_LICENSE_FILE=${HOME}/license_8706.dat
CVSROOT=:ext:titanrt@esekilx5008.rnd.ki.sw.ericsson.se:/proj/TTCN/cvs_root
CVS_SERVER=/usr/bin/cvs
CVS_RSH=ssh
EDITOR=mcedit
MODULEPATH=/app/TITAN/modules:/proj/TTCN/modules:/app/modules/0/modulefiles:/home/titanrt/.afs/0/rmodules:/home/titanrt/.afs/0/pmodules:/env/seki/modules:/home/titanrt/.afs/0/imodules:/env/common/modules
# For HUB access.
TCCLAB1_IP=159.107.194.73
TCCLAB2_IP=159.107.194.76
TCCLAB3_IP=159.107.194.74
TCCLAB5_IP=159.107.194.75
export TTCN3_LICENSE_FILE CVSROOT CVS_SERVER CVS_RSH EDITOR OSS_DIR SEA_DIR PATH LD_LIBRARY_PATH EIN_DIR SS7_HOME TCCLAB1_IP TCCLAB2_IP TCCLAB3_IP TCCLAB5_IP MODULEPATH
/app/modules/3.2.8/bin/modulecmd bash add cvs
#!/bin/bash -x
# Basic configuration for `esekits3013' (147.214.15.96).
SS7_HOME=/mnt/common_store/tools/EIN/linux64
EIN_DIR=${SS7_HOME}
OSS_DIR=/mnt/TTCN/Tools/OSS/linux-glibc2.3-amd64/8.5.0
SEA_DIR=/mnt/common_store/tools/SEA/linux64
GLIB_DIR=/usr
SCTP_DIR=/usr
if [ x`uname -s` = "xSunOS" ]; then
PATH=/proj/TTCN/Tools/libxml2-2.7.8/bin:/app/expect/5.42/bin:/proj/TTCN/Tools/grep-2.9/bin:/proj/TTCN/Tools/perl-5.10.1/bin:/proj/TTCN/Tools/tar-1.25/bin:/proj/TTCN/Tools/make-3.82/bin:/usr/bin:/bin:${PATH}
fi
LD_LIBRARY_PATH=${SS7_HOME}/lib64:${SEA_DIR}/lib:${OSS_DIR}/lib:/usr/lib64:${LD_LIBRARY_PATH}
TTCN3_LICENSE_FILE=/home/titanrt/license_8706.dat
CVSROOT=:ext:titanrt@esekilx5008.rnd.ki.sw.ericsson.se:/proj/TTCN/cvs_root
CVS_SERVER=/usr/bin/cvs
CVS_RSH=ssh
EDITOR=mcedit
MODULEPATH=/app/TITAN/modules:/proj/TTCN/modules:/app/modules/0/modulefiles:/home/titanrt/.afs/0/rmodules:/home/titanrt/.afs/0/pmodules:/env/seki/modules:/home/titanrt/.afs/0/imodules:/env/common/modules
# For HUB access.
TCCLAB1_IP=159.107.194.73
TCCLAB2_IP=159.107.194.76
TCCLAB3_IP=159.107.194.74
TCCLAB5_IP=159.107.194.75
export TTCN3_LICENSE_FILE CVSROOT CVS_SERVER CVS_RSH EDITOR OSS_DIR SEA_DIR PATH LD_LIBRARY_PATH EIN_DIR SS7_HOME TCCLAB1_IP TCCLAB2_IP TCCLAB3_IP TCCLAB5_IP MODULEPATH
/app/modules/3.2.8/bin/modulecmd bash add cvs
/app/modules/3.2.8/bin/modulecmd bash add expect
#!/bin/bash -x
# Basic configuration for `esekits5013' (147.214.15.153).
SS7_HOME=/mnt/common_store/tools/EIN/linux64
EIN_DIR=${SS7_HOME}
OSS_DIR=/mnt/TTCN/Tools/OSS/linux-glibc2.3-amd64/8.5.0
SEA_DIR=/mnt/common_store/tools/SEA/linux64
GLIB_DIR=/usr
SCTP_DIR=/usr
if [ x`uname -s` = "xSunOS" ]; then
PATH=/proj/TTCN/Tools/libxml2-2.7.8/bin:/app/expect/5.42/bin:/proj/TTCN/Tools/grep-2.9/bin:/proj/TTCN/Tools/perl-5.10.1/bin:/proj/TTCN/Tools/tar-1.25/bin:/proj/TTCN/Tools/make-3.82/bin:/usr/bin:/bin:${PATH}
LD_LIBRARY_PATH=${SS7_HOME}/lib64:${SEA_DIR}/lib:${OSS_DIR}/lib:/usr/lib64:${LD_LIBRARY_PATH}
else
PATH=/app/libxml/2.7.7/LMWP2/bin:/usr/bin:/bin:${PATH}
LD_LIBRARY_PATH=/app/libxml/2.7.7/LMWP2/lib:${SS7_HOME}/lib64:${SEA_DIR}/lib:${OSS_DIR}/lib:/usr/lib64:${LD_LIBRARY_PATH}
fi
TTCN3_LICENSE_FILE=/home/titanrt/license_8706.dat
CVSROOT=:ext:titanrt@esekilx5008.rnd.ki.sw.ericsson.se:/proj/TTCN/cvs_root
CVS_SERVER=/usr/bin/cvs
CVS_RSH=ssh
EDITOR=mcedit
MODULEPATH=/app/TITAN/modules:/proj/TTCN/modules:/app/modules/0/modulefiles:/home/titanrt/.afs/0/rmodules:/home/titanrt/.afs/0/pmodules:/env/seki/modules:/home/titanrt/.afs/0/imodules:/env/common/modules
JAVA_HOME=/app/jdk/1.6.0_30/LMWP3
# For HUB access.
TCCLAB1_IP=159.107.194.73
TCCLAB2_IP=159.107.194.76
TCCLAB3_IP=159.107.194.74
TCCLAB5_IP=159.107.194.75
export JAVA_HOME TTCN3_LICENSE_FILE CVSROOT CVS_SERVER CVS_RSH EDITOR OSS_DIR SEA_DIR PATH LD_LIBRARY_PATH EIN_DIR SS7_HOME TCCLAB1_IP TCCLAB2_IP TCCLAB3_IP TCCLAB5_IP MODULEPATH
eval `/app/modules/0/bin/modulecmd bash add cvs`
eval `/app/modules/0/bin/modulecmd bash add expect`
eval `/app/modules/0/bin/modulecmd bash add TCCENV`
eval `/app/modules/0/bin/modulecmd bash add libxml`
#!/bin/bash -x
# Basic configuration for `rhea' (159.107.193.33).
SS7_HOME=/view/eferkov_tcc/vobs/ttcn/TCC_Common/Other/EINSS7/19089-lzy2143405_1_R1C/EABss7019
EIN_DIR=${SS7_HOME}
OPENSSL_DIR=/mnt/TTCN/Tools/openssl-0.9.8k
OSS_DIR=/mnt/TTCN/Tools/oss/ossasn1/solaris-2.4/latest
OSSXINFO=/mnt/TTCN/Tools/oss/xsdasn1/solaris-2.4/latest
TENUX_DIR=/view/eferkov_tcc/vobs/ttcn/TCC_Common/Other/tenux
# It will not work, unless a view is active...
SEA_DIR=/view/eferkov_tcc/vobs/ttcn/TCC_Common/Other/SEA_LATEST
SCTP_DIR=/view/eferkov_tcc/vobs/ttcn/TCC_Common/Other/SCTP/sctplib-1.0.1/sctplib/sctp/.libs
GLIB_DIR=/usr/local/lib
PATH=/mnt/TTCN/Tools/libxml2-2.7.1/bin:${SEA_DIR}/bin:${OSSXINFO}/bin:${OSS_DIR}/bin:/mnt/TTCN/Tools/tar-1.18/bin:/mnt/TTCN/Tools/gcc-4.1.2-sol8/bin:/home/cfccadm/bin/public:usr/atria/bin:/usr/local/gnu/bin:/usr/local/bin:/usr/bin:/bin:/mnt/TTCN/Tools/makedepend-R6.6/bin:${PATH}
LD_LIBRARY_PATH=${SS7_HOME}/lib:/mnt/TTCN/Tools/openssl-0.9.8k/lib:/mnt/TTCN/Tools/libxml2-2.7.1/lib:${TENUX_DIR}/lib:${SEA_DIR}/lib:${OSSXINFO}/lib:${OSS_DIR}/lib:/mnt/TTCN/Tools/gcc-3.4.6-sol8/lib:/usr/atria/bin:/usr/local/gnu/lib:/usr/local/lib:/usr/lib:/lib:/mnt/TTCN/Tools/makedepend-R6.6/lib:${LD_LIBRARY_PATH}
TTCN3_LICENSE_FILE=${HOME}/license_8706.dat
CVSROOT=esekits1064.rnd.ki.sw.ericsson.se:/proj/TTCN/cvs_root
CVS_SERVER=/usr/local/bin/cvs
CVS_RSH=ssh
EDITOR=mcedit
export PATH LD_LIBRARY_PATH TTCN3_LICENSE_FILE CVSROOT CVS_SERVER CVS_RSH EDITOR OSS_DIR OPENSSL_DIR OSSXINFO TENUX_DIR SEA_DIR EIN_DIR SS7_HOME SCTP_DIR GLIB_DIR
#!/bin/bash -x
# Basic configuration for `tcclab1' (172.31.21.7).
SS7_HOME=/mnt/common_store/tools/EIN/linux64
EIN_DIR=${SS7_HOME}
OSS_DIR=/mnt/TTCN/Tools/OSS/linux-glibc2.3-amd64/8.5.0
SEA_DIR=/mnt/common_store/tools/SEA/linux64
GLIB_DIR=/usr
SCTP_DIR=/usr
PATH=${HOME}/apps/gnuplot-4.4.0/bin:${OSS_DIR}/bin:${PATH}
LD_LIBRARY_PATH=${HOME}/apps/gnuplot-4.4.0/lib:${SS7_HOME}/lib64:${SEA_DIR}/lib:${OSS_DIR}/lib:/usr/lib64:${LD_LIBRARY_PATH}
TTCN3_LICENSE_FILE=${HOME}/license_8706.dat
CVSROOT=esekits1064.rnd.ki.sw.ericsson.se:/proj/TTCN/cvs_root
CVS_RSH=${CVS_RSH=ssh}
CVS_SERVER=/usr/bin/cvs
EDITOR=mcedit
export TTCN3_LICENSE_FILE CVSROOT CVS_SERVER CVS_RSH EDITOR OSS_DIR SEA_DIR PATH LD_LIBRARY_PATH EIN_DIR SS7_HOME
ulimit -c unlimited
List of files
-------------
- titan_builder.sh: Wrapper script for titan_builder.py. It sets some basic
environment variables for platforms with tools installed
to non-standard locations.
- titan_builder.py: Build process control functions. It shouldn't be run
directly, use the wrapper script instead.
- titan_builder_cfg.py: The configuration file. It contains the build
configurations, build slaves etc.
- product_handler.py: Helper functions to build the VOB products.
- titan_publisher.py: Different publishing related functions.
- utils.py: General purpose functions.
Brief overview
--------------
When titan_builder.sh is started, it checks out a build configuration specific
version of TITAN from CVS. TITAN gets configured according to the build
configuration (e.g. variables in Makefile.cfg). When it's ready, TITAN is
distributed to each slave attached to the given build configuration. The
builds are performed sequentially. All script files are distributed as well
and the script starts executing in slave mode on the slave machine. The master
and the slave can be the same machines. In this case, using different build
directories for them is strongly recommended. When all passes are finished on
the slave machine the master starts the build on the next slave machine etc.,
then the remaining build configurations are built.
After all that, the master collects all logs from the slave machines. The
slaves can produce three kinds of outputs: CSV, TXT, HTML. The CSV file is
essential, since the master will consider each slave lost without such a file.
The CSV file is used to generate the e-mail notification message as well.
Finally, the master publishes the logs and cleans things up. The compiled
sources will remain available on each slave until the next build.
To run VOB product tests the VOB or a similar directory structure of products
should be available on master machine. SSHFS can be used for this purpose.
The performance test package is not part of the official TITAN test suite,
hence it needs to be distributed for the slaves as well. Currently it's just
an archive reachable on the master machine. It's recommended to use
configspec 129 and the TCC_Common VOB.
All shell commands are executed using the `run_cmd()' function. It has a
timeout parameter to kill the command.
To make sure, that always the latest version of the scripts runs, one can use
a simple script, which checks out the sources from CVS first:
#!/bin/bash
rm -rf *.{py,sh} TTCNv3/etc/autotest
cvs co TTCNv3/etc/autotest && ln -sf TTCNv3/etc/autotest/*.{py,sh} .
./titan_builder.sh -c tests_on_x86_64_linux,tests_on_solaris,tests_on_i386_solaris,limited_tests_on_ubuntu910 1>/dev/null
Prerequisites
-------------
- Python >= 2.3
- Configured password-less SSH connections between the master and the slave
- For scheduled execution use `cron'
Command line options
--------------------
-c [c1,c2,...]: Select the build configurations to run. If no build
configuration is selected, then all configurations will be
run. It's a comma separated list.
-d: Print all the available build configurations present in the configuration
file. Slaves attached to a given build configuration are listed as well.
-h: Display available options.
-s: Start the script in slave mode. This option should only be used by
titan_builder.py, unless everything is in place.
Configuration
-------------
It's a Python source file, take care of the syntax.
- Common options
buiddir:STR The build directory of the master.
logdir:STR The logs of the master go here.
htmldir:STR All HTML files will be published here.
vob:STR The VOB products will be copied from here.
archive:INT Archive the logs after a specified number of days.
cleanup:INT Move the archived logs somewhere else after a specified number of days.
measureperiod:INT Reset scores after a given number of days.
cleanupslave:{slave:STR,dir:STR} The destination of abandoned logs.
- Recipients
{name:STR,address:STR}
The names and e-mail addresses of the recipients.
- Slaves
slaves[name:STR]:{ip:STR,user:STR,configs:LIST}
The IP address, the user's name, the build configurations attached to the
slave. Currently one build configuration is supported for each slave.
- Product descriptions
products[kind:STR]:{name:STR,action0:BOOL,action1:BOOL,...}
`kind' is always a directory under the VOB's root directory (e.g.
TestPorts, ProtocolModules). `name' is the product name. Actions can be
enabled individually. The predefined actions are the following:
- semantic: `compiler -s'
- translate: `compiler'
- compile: `make'
- run: `make run'
- Build configurations
version:STR Version of TITAN to use. It can be a CVS tag or date.
If it's not set the HEAD will be taken.
license:STR Location of the license file.
gui:BOOL The `GUI' part in Makefile.cfg.
jni:BOOL The `JNI' part in Makefile.cfg.
debug:BOOL The `DEBUG' part in Makefile.cfg.
compilerflags:STR The `COMPILERFLAGS' in Makefile.cfg.
ldflags:STR The `LDFLAGS' in Makefile.cfg.
gccdir:STR This will affect `CC' and `CXX'.
*cc:STR Value of `CC' in synch with the previous option.
*cxx:STR Value of `CXX' in synch with the previous option.
flex:STR Replace `FLEX'.
perl:STR Location of the `perl' interpreter.
bison:STR Replace `BISON'.
jdkdir:STR Replace `JDKDIR'.
qtdir:STR Replace `QTDIR'.
xmldir:STR Replace `XMLDIR'.
openssldir:STR Replace `OPENSSL_DIR'.
regtest:BOOL Run regression tests.
perftest:BOOL Run performance tests. The location of the testsuite
must be known, since it's not part of CVS. It should
be available for the master locally.
perftestdir:STR Location of the performance tests.
*cpsmin:INT Minimum CPS value for performance tests.
*cpsmax:INT Maximum CPS value for performance tests.
functest:BOOL Run function tests.
vobtest:BOOL Run product tests.
*vobtest_logs:BOOL Save logs for product tests.
rt2:BOOL Run tests with both run-times.
builddir:STR Everything will be done here. It should be different
from the master's.
logdir:STR Place of the logs.
*pdfdir:STR Local directory to copy .pdf files from. If not present
no *.pdf files will be there. If it's an empty string
the *.pdf files will be faked with empty files.
*xsdtests:BOOL Disable regression tests for `xsd2ttcn'. It's very time
consuming.
measure:BOOL Enable `quality' measurements.
(`*' is for optional fields.)
Platform specific settings
--------------------------
If some essential tools (e.g. GCC) are installed to non-standard locations on a
given platform, all of these environmental settings can be placed into a
configuration file `${HOME}/.titan_builder'. This file is always sourced
first, before starting the actual build. An example file:
#!/bin/bash
# Basic configuration for `bangjohansen' (172.31.21.76).
PATH=${HOME}/apps/bin:/mnt/TTCN/Tools/gcc-3.4.6-sol10/bin:/mnt/TTCN/Tools/binutils-2.17-sol10/bin:/usr/local/bin:/usr/bin:${PATH}
LD_LIBRARY_PATH=${HOME}/apps/lib:/mnt/TTCN/Tools/gcc-3.4.6-sol10/lib:/mnt/TTCN/Tools/binutils-2.17-sol10/lib:/usr/local/lib:/usr/lib:${LD_LIBRARY_PATH}
TTCN3_LICENSE_FILE=${HOME}/.TTCN3/license_2536.dat
CVSROOT=esekits1064.rnd.ki.sw.ericsson.se:/proj/TTCN/cvs_root
CVS_SERVER=/usr/local/bin/cvs
CVS_RSH=ssh
EDITOR=mcedit
export PATH LD_LIBRARY_PATH CVSROOT CVS_SERVER EDITOR TTCN3_LICENSE_FILE CVS_RSH
When something goes wrong
-------------------------
E.g. no e-mail message is received, garbage or missing sections in the e-mail
or on the generated HTML page...
- Possible reasons and possible solutions
- Problems with e-mail system: In case of Postfix check the `mailq'
command. All messages still in the queue should be printed. An example
output of the `mailq' command:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
5A57D160B02 1696 Fri Oct 16 09:32:05 ferenc.kovacs@ericsson.com
(host mwux020.eth.ericsson.se[159.107.148.18] said: 452 4.4.5
Insufficient disk space; try again later (in reply to MAIL FROM command))
ferenc.kovacs@ericsson.com
To clear all the messages: `postsuper -d ALL'.
- Exception in the Python code: Check the titan_builder.err-log file of the
master and the slaves. All exceptions should go into this file. The
other log file titan_builder.log can be useful as well.
- Disk quota exceeded.
- The SSHFS mounted partitions (e.g. used for HTML publishing) get umounted.
The common cause is a segfault:
Dec 12 07:00:50 tcclab1 kernel: sshfs[20289]: segfault at 6507a ip
7fbf99315064 sp 44288ea8 error 4 in libc-2.5.so[7fbf992a2000+139000]
Check /var/log/messages for details.
If SSHFS locks up and the mounted partitions cannot be umounted like:
titanrt@tcclab1:~> fusermount -u ~/public_html
fusermount: failed to unmount /home/titanrt/public_html: Device or resource busy
Simply `killall -9 sshfs' and try to remount the partitions. If SSHFS
locks up you may not be able to execute any command in the parent
directory of these mount points. The commands will simply hang. If it
doesn't work, try the following:
titanrt@tcclab1:~> lsof | grep public_html
lsof: WARNING: can't stat() fuse file system /home/titanrt/public_html
Output information may be incomplete.
bash 2378 titanrt cwd unknown /home/titanrt/public_html/titan_builds (stat: Transport endpoint is not connected)
ssh 13480 titanrt cwd unknown /home/titanrt/public_html/titan_builds (stat: Transport endpoint is not connected)
titanrt@tcclab1:~> kill -9 2378
Unfortunately SSHFS is very unstable and hangs regularly, at least the 1.7
version used on the master machine, which was released in 2006. Another
thing that may help:
titanrt@tcclab1:~> killall -9 sshfs
tcclab1:/home/titanrt/titan_nightly_builds # umount -l vobs/ttcn
tcclab1:/home/titanrt/titan_nightly_builds # umount -l vobs
- It's possible that some kind of network problem prevents the nightly tests to
check out the latest script files. If there're broken links in the test
directory and the test results are missing this might be the case. To make
the script run next morning the freshbuild.sh needs to be run first, since
freshbuild.sh is run by cron.
Licenses
--------
The script can be run by anyone. Currently, `titanrt' is used for this
purpose, however, the actual user can really be anyone, since it is set from
the environment. It is a general user available on most of our supported
platforms, it can be created manually in need. To eliminate user dependence,
all non-absolute paths in the configuration file are prefixed automatically
with the current user's home directory.
To run the tests on all of the supported platforms we're using `hostid' based
license files. The license file numbers at the moment:
tcclab1 (172.31.21.7, 0x67666473): 4812
tcclab2 (172.31.21.49, 0x67666473): 4812
rhea (159.107.193.33, 0x83dbd963): 5628
bangjohansen (172.31.21.76, 0x380f076e): 2551
Statistics generation
---------------------
Please note, that the statistics automatically generated by the test system
are useless, unless they're monitored continuously. Invalid failures will not
be taken into account by the test system. The statistics are extracted from
the `report.txt' files. Only the `Reg. tests', `Func. tests', `Perf. tests'
are important. Weekends are never counted, but holidays need to be handled by
hand.
Rules:
All of them pass -> 2 points
Any of them fails -> 0 points
Any of them lost -> 1 points
Sample output:
First period: 2011-03-01 03:01:00
Overall score: 90/100 (90%) Commitment
This period: 2011-06-01 03:01:00
Period score: 9/10 (90%) Commitment
#!/bin/bash
###############################################################################
# Copyright (c) 2000-2017 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
#
# Balasko, Jeno
# Beres, Szabolcs
# Kovacs, Ferenc
#
###############################################################################
# We need a CVSROOT.
. ~/.titan_builder
rm -rf *.{py,pyc,sh} TTCNv3/etc/autotest
cvs -t co TTCNv3/etc/autotest 2>&1 | tee cvs_autotest_output.txt && ln -sf TTCNv3/etc/autotest/*.{py,sh} .
if [ "$1" = "-only_vobtests" ] ; then ./titan_builder.sh -c vobtests_on_x86_64_linux_tcclab1,vobtests_on_sparc_solaris_esekits3013 1>/dev/null
elif [ "$1" = "-daily" ] ; then ./titan_builder.sh -c x86_64_linux_tcclab3_your_last_chance 1>/dev/null
else ./titan_builder.sh -c x86_64_linux_tcclab5,x86_64_linux_tcclab4,x86_64_linux_tcclab5_clang,x86_64_linux_tcclab1,x86_64_linux_tcclab2,x86_64_linux_tcclab3,sparc_solaris_esekits3013,i386_solaris_bangjohansen,x86_64_linux_esekilxxen1843,vobtests_on_x86_64_linux_tcclab1 1>/dev/null
fi
###############################################################################
# Copyright (c) 2000-2017 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
#
# Balasko, Jeno
#
###############################################################################
#!/bin/bash
# The view is currently for `eferkov', but it's not important if CS 129 is
# loaded. The same for the directory used for publishing. The license file
# and the archive directory are for `eferkov' as well. Update the files here
# frequently as they change in CVS.
sshfs -o ro,reconnect,transform_symlinks titanrt@147.214.15.153:/view/eferkov_tcc/vobs/ttcn /home/titanrt/titan_nightly_builds/vobs/ttcn
sshfs -o reconnect,transform_symlinks titanrt@147.214.15.96:/proj/TTCN/www/ttcn/root/titan-testresults /home/titanrt/titan_nightly_builds/web
##############################################################################
# Copyright (c) 2000-2017 Ericsson Telecom AB
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Balasko, Jeno
# Kovacs, Ferenc
#
##############################################################################
import os, re
import titan_publisher, utils
MAKEFILE_PATCH = 'makefile_patch.sh'
class product_handler:
""" It is assumed that the VOB is reachable (e.g. through an SSHFS mounted
directory) on the master machine. The source package is copied to all
slaves with SCP. It is assumed that the logger is always set.
Saving stdout and stderr of product actions is optional. During
publishing these files should be linked or copied to somewhere under
`public_html'.
"""
def __init__(self, logger = None, config = None):
self._logger = logger
self._config = config
def config_products(self, target_path):