Megatest

Check-in [712f18e24b]
Login
Overview
Comment:Update nbfake to write output to stderr, and append to logfile. Update nbfake variables, but fall back to old TARGETHOST vars
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60-nbfake-stderr
Files: files | file ages | folders
SHA1: 712f18e24b073cc186bccfc5c0803639e15e39e0
User & Date: tyardeni on 2014-10-29 11:47:47
Other Links: branch diff | manifest | tags
Context
2014-10-29
12:14
Added header and help message to nbfake check-in: 7d862aea5e user: tyardeni tags: v1.60-nbfake-stderr
11:47
Update nbfake to write output to stderr, and append to logfile. Update nbfake variables, but fall back to old TARGETHOST vars check-in: 712f18e24b user: tyardeni tags: v1.60-nbfake-stderr
2014-10-28
23:08
Don't do threaded registration check-in: 2513a8d303 user: matt tags: v1.60
Changes

tests/installall/config/megatest.config.dat became a regular file with contents [736a5da885].

tests/installall/config/runconfigs.config.dat became a regular file with contents [3b8f260acb].

Modified utils/nbfake from [e5bec056c7] to [625c735179].

1
2

3
4
5

6







7
8


9
10
11
12

13
14
15
16
17
18
19
20
21
#!/bin/bash


# Can't always trust $PWD
CURRWD=`pwd`


if [[ $TARGETHOST_LOGF == "" ]]; then







    TARGETHOST_LOGF=NBFAKE-`date +%GWW%V.%u_%T`
fi


echo "#======================================================================"
echo "# NBFAKE Logging command to $TARGETHOST_LOGF"
echo "#     \"$*\""
echo "#======================================================================"


if [[ $TARGETHOST == ""  ]]; then
  unset TARGETHOST
  TARGETHOST_LOGF_TEMP=$TARGETHOST_LOGF
  unset TARGETHOST_LOGF
  sh -c "cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* >> $TARGETHOST_LOGF_TEMP 2>&1 &"
else
  ssh -n -f $TARGETHOST "sh -c \"cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* >> $TARGETHOST_LOGF 2>&1 &\""
fi


>

|

>
|
>
>
>
>
>
>
>
|

>
>
|
|
|
|
>

|
<
<
<
|

|

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
#!/bin/bash


# Can't always trust $PWD
CURRWD=$(pwd)

# Make sure nbfake host and logfile are set. Fall back to old-style variable names

if [[ -z "$NBFAKE_HOST" && -n "$TARGETHOST" ]];     then NBFAKE_HOST=$TARGETHOST;     fi

if [[ -z "$NBFAKE_LOG" && -n "$TARGETHOST_LOGF" ]]; then NBFAKE_LOG=$TARGETHOST_LOGF; fi

# Set default nbfake log

if [[ -z "$NBFAKE_LOG" ]]; then
    NBFAKE_LOG=NBFAKE-$(date +%GWW%V.%u_%T)
fi

cat <<__EOF >&2
#======================================================================
# NBFAKE logging command to: $NBFAKE_LOG
#     $*
#======================================================================
__EOF

if [[ -z "$NBFAKE_HOST" ]]; then



  sh -c "cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* >> $NBFAKE_LOG 2>&1 &"
else
  ssh -n -f $NBFAKE_HOST "sh -c \"cd $CURRWD;export DISPLAY=$DISPLAY; export PATH=$PATH; nohup $* >> $NBFAKE_LOG 2>&1 &\""
fi