devloop icon
Metastores

database performance: test setup: Support Scripts


In order to run each series of tests completely unattended and with a full system reboot in between each test, we used a combination of small shell scripts to schedule each test batch.

Whenever the system is rebooted into the control instance, a support script is started from /etc/rc.local which:
  • Grabs the next test to run from a list (and move it to the log list).
    The test set consists of: the location of the disk image to test and the JDBC connection details for this image, the JDK and the kernel to test.
  • Extracts the disk images onto the partitions and mounts them.
  • Selects the JDK to use for this test by creating a softlink to the desired directory as /opt/jdk
  • Creates the test script with the appropriate JDBC connection details and adds a call to it from /etc/rc.local
  • Copies the test code and support software (JUnit, Ant, etc..) to the image
  • Places the kernel link and boot partition pointers into the current /boot/grub/grub.conf file.
  • Reboots
Whenever the system is rebooted into a test image, the /etc/rc.local script:
  • Starts up the database if needed. (most databases are started automatically using a standard /etc/init.d/ script created on installation).
  • Calls the test script.
  • Copies the results to the test sample partition.
  • Changes the default boot option to cycle back to the control instance.
  • Reboots
Each set of scripts also logs a relatively small amount of console output text to log files to allow us to debug in case of test failure.

Jump to page:

Index