ReferencePlatforms/Test/Foopy: Difference between revisions

Jump to navigation Jump to search
m
Line 67: Line 67:


== helper scripts to populate /builds ==
== helper scripts to populate /builds ==
 
Locate your tools/buildfarm/mobile/ directory and run
on your local computer, in a temp dir, save the following scripts and files:
 
#!/bin/bash
# foopies.sh
cd ~/temp/foopy
if [ "$1" == "ssh" ]; then
  echo "setting up initial ssh config for foopy$2"
  ssh cltbld@foopy$2 'mkdir /Users/cltbld/.ssh ; chmod 0700 /Users/cltbld/.ssh ; touch /Users/cltbld/.ssh/authorized_keys ; chmod 0644 /Users/cltbld/.ssh/authorized_keys'
  scp foopy-authorized_keys cltbld@foopy$2:.ssh/authorized_keys
  scp id_rsa id_rsa.pub cltbld@foopy$2:/Users/cltbld/.ssh/
  exit
fi
if [ -z $1 ] ; then
  FOOPIES="12"
else
  FOOPIES=$*
fi
for f in ${FOOPIES} ; do
  case "$f" in
    "05" | "5" )
      FOOPY=foopy05
      TEGRAS="001 002 003 004 005 006 007 008 009 010 011 012 013"
    ;;
    "06" | "6" )
      FOOPY=foopy06
      TEGRAS="014 015 016 017 018 019 020 021 022 023 024 025 026"
      ;;
    "07" | "7" )
      FOOPY=foopy07
      foopy07="027 028 029 030 031 032 033 034 035 036 037 038 039"
      ;;
    "08" | "8" )
      FOOPY=foopy08
      TEGRAS="040 041 042 043 044 045 046 047 048 049 050 051 052"
      ;;
    "09" | "9" )
      FOOPY=foopy09
      TEGRAS="053 054 055 056 057 058 059 060 061 062 063 064 065"
      ;;
    "10" )
      FOOPY=foopy10
      TEGRAS="066 067 068 069 070 071 072 073 074 075 076 077 078"
      ;;
    "11" )
      FOOPY=foopy11
      TEGRAS="079 080 081 082 083 084 085 086 087 088 089 090 091"
      ;;
    "12" )
      FOOPY=foopy12
      FOOPYIP=10.250.48.212
      TEGRAS="092 093 094 095 096 097 098 099 100 101 102 103 104"
      ;;
    "13" )
      FOOPY=foopy13
      FOOPYIP=10.250.48.213
      TEGRAS=""
      ;;
    "14" )
      FOOPY=foopy14
      FOOPYIP=10.250.48.214
      TEGRAS=""
      ;;
    "15" )
      FOOPY=foopy15
      FOOPYIP=10.250.48.217
      TEGRAS=""
      ;;
    "16" )
      FOOPY=foopy16
      FOOPYIP=10.250.48.218
      TEGRAS=""
      ;;
    "17" )
      FOOPY=foopy17
      FOOPYIP=10.250.48.219
      TEGRAS=""
      ;;
    * )
      FOOPY=""
      TEGRAS=""
      echo "You must specify a foopy ID"
      exit
  esac
  echo "Setting up ${FOOPY} ${FOOPYIP}"
  scp setup_foopy.sh cltbld@${FOOPY}:.
  ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/setup_foopy.sh ; /Users/cltbld/setup_foopy.sh'
 
  cp create_dirs.sh.in create_dirs.sh.sed
  sed "s/sedTEGRALISTsed/${TEGRAS}/" create_dirs.sh.sed > create_dirs.sh
 
  scp create_dirs.sh buildbot.tac.tegras check.sh start_cp.sh stop_cp.sh crontab.foopy cltbld@${FOOPY}:.
  scp pushfile.py cltbld@${FOOPY}:/builds/sut_tools/
  ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/create_dirs.sh ; /Users/cltbld/create_dirs.sh'
  ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/setup_foopy.sh ; /Users/cltbld/setup_foopy.sh'
  ssh cltbld@${FOOPY} 'chmod +x /Users/cltbld/create_dirs.sh ; /Users/cltbld/create_dirs.sh'
  cp tegra_stats.sh.in tegra_stats.sh.sed
  sed "s/sedFOOPYNNsed/${FOOPY}/" tegra_stats.sh.sed > tegra_stats.sh
  cp SUTAgent.ini.in SUTAgent.ini.sed
  sed "s/sedFOOPYIPsed/${FOOPYIP}/" SUTAgent.ini.sed > SUTAgent.ini
  cp watcher.ini.in watcher.ini.sed
  sed "s/sedFOOPYIPsed/${FOOPYIP}/" watcher.ini.sed > watcher.ini
  scp tegra_stats.sh SUTAgent.ini update_sutagentini.sh cltbld@${FOOPY}:/builds/
  rm -f create_dirs.sh create_dirs.sh.sed
  rm -f tegra_stats.sh tegra_stats.sh.sed
  rm -f watcher.ini watcher.ini.sed
  rm -f SUTAgent.ini SUTAgent.ini.sed
done
 
#!/bin/sh -x
# setup_foopies.sh
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
if [ ! -d /builds ]; then
  mkdir /builds
fi
cd /builds
if [ ! -d /builds/talos-data ]; then
  mkdir /builds/talos-data
  cd /builds/talos-data
  hg clone http://hg.mozilla.org/users/tglek_mozilla.com/fennecmark bench@taras.glek
  hg clone http://hg.mozilla.org/build/pageloader pageloader@mozilla.org
  hg clone http://hg.mozilla.org/build/talos talos
fi
if [ ! -d /builds/tools ]; then
  cd /builds
  hg clone http://hg.mozilla.org/build/tools tools
  cd /builds/tools/sut_tools
  ln -s /builds/talos-data/talos/devicemanager.py .
fi
if [ ! -d /builds/sut_tools ]; then
  cd /builds
  ln -s /builds/tools/sut_tools sut_tools
fi
cd /builds
 
To initialize a foopy, run  


  ./foopies.sh ssh ##
  ./foopies.sh ssh ##
470

edits

Navigation menu