{section: Testing HTCondor with NMI} {subsection: Testing a Previous HTCondor Build} The easiest way to test now is from a workspace with or without a build happening first. The easiest way to move it to a folder called workspace on the NMI submit node(say submit-2.batlab.org) is as follows: {code} cd top of your workspace git write-tree # produce something like a68e0821c9808d2f584b593f3eeef65c3b4a432 git archive a68e0821c9808d2f584b593f3eeef65c3b4a432 | ssh submit-2.batlab.org \ cd workspace '&&' tar xf - {endcode} **All of the following variations happen within nmi_tools.** To build and then run all the tests go like this: {code} ./condor_nmi_submit --build --git --workspace=../ --platforms=all \ --notify-fail-only --desc="Tolerance for searchmulti" {endcode} To run the tests in your workspace and not do any builds, pick a build you want to test against and do the following: {code} ./condor_nmi_submit --test --platforms=all --buildid=135391 \ --workspace=../ --ignore-missing-platforms --test-sources-from-workspace {endcode} If the build you want to test was made from a git tag, you can submit the tests using the same tag: {code} /home/cndrauto/condor/nmi_tools/condor_nmi_submit --test --buildid=209846 \ --tag=BUILD-trunk-2010-1-13 --module=UNUSED --git --platforms=all \ --submit-xtests {endcode} If the build you want to test was a workspace build, you can submit the tests using the same workspace. Run this from the =nmi_tools= directory of your workspace: {code} ./condor_nmi_submit --test --buildid=209633 --git --platforms=all \ --workspace=.. --submit-xtests {endcode} You can restrict the set of platforms tested by giving a comma-separated list for the =--platforms= option. If you don't want any cross-platform tests, you can use =--nosubmit-xtests=. The blacklist a particular host, add something like this to the condor_nmi_submit line: {code} --append 'append_requirements=Machine!="nmi-0102.batlab.cs.wisc.edu"' {endcode} {section: The following is old documentation that needs to be updated or removed} {subsection: Using a Workspace Directory to Test a Previous HTCondor Build} For this scenario, my job_core_max-local-running tests were producing false negatives on random platforms in the nightly build. I wanted to make a fix to the test files and then test my changes against the previous night's build. These instructions will allow you to do that without having to commit any of your changes to CVS. First, tar up your workspace directory. Make sure that you have both the externals and docs directories checked out: {code} 1:30pm[chopin:~/Workspace]$ la V6_7-branch/ total 32K drwxr-x--- 4 pavlo pavlo 14K Dec 19 12:17 NTconfig/ drwxr-x--- 3 pavlo pavlo 2.0K Dec 19 12:17 config/ drwxr-x--- 13 pavlo pavlo 2.0K Dec 19 12:17 doc/ drwxr-x--- 4 pavlo pavlo 2.0K Dec 19 13:19 externals/ drwxr-x--- 3 pavlo pavlo 2.0K Nov 1 10:55 imake/ drwxr-x--- 8 pavlo pavlo 2.0K Dec 19 12:17 nmi_glue/ drwxr-x--- 141 pavlo pavlo 8.0K Dec 19 12:18 src/ 1:30pm[chopin:~/Workspace]$ tar zfvc V6_7-branch.tar.gz V6_7-branch/ {endcode} Upload the tar file to the NMI submission host: {code} 1:36pm[chopin:~/Workspace]$ scp V6_7-branch.tar.gz pavlo@grandcentral:~/ {endcode} Now on the submission host, unpack the tar file: {code} 1:38pm[grandcentral:~]$ tar zxfv V6_7-branch.tar.gz {endcode} This next step is very important. We need to run the pre_all script on our Workspace directory. This will build the man pages and create a source tarball, so that's why you need externals and docs: {code} 1:38pm[grandcentral:~]$ cd V6_7-branch 1:38pm[grandcentral:~/V6_7-branch]$ ./nmi_glue/build/pre_all {endcode} In the copied over Workspace directory you should just have the following files: {code} 1:50pm[grandcentral:~/V6_7-branch]$ la total 320M -rw-rw-r-- 1 pavlo pavlo 160M Dec 19 13:28 condor-6.7.15.tar.gz -rw-rw-r-- 1 pavlo pavlo 6 Dec 19 13:25 CONDOR-VERSION drwxr-x--- 8 pavlo pavlo 4.0K Dec 19 12:17 nmi_glue/ -rw-rw-r-- 1 pavlo pavlo 160M Dec 19 13:28 results.tar.gz {endcode} The =condor-6.7.15.tar.gz= file is what you're going to want to submit as the test source. =results.tar.gz= just contains a copy of =condor-6.7.15.tar.gz= and =CONDOR-VERSION=. cd to nmi_tools to ensure you get the correct "condor_nmi_submit". Finally, we will submit a new NMI test using a previous build result. The *test-src* option is where the system will get the test sources to run against the build results. Make sure that you give the full path to this option (don't just use ./). The *test-args* option is the test class that you want to specifically test (see =condor_tests/README.testclass=). {code} 1:50pm[grandcentral:~/V6_7-branch]$ ./condor_nmi_submit --test --buildid=16426 \ --tag=BUILD-V6_7-branch-2005-12-19 --module=V6_7_BUILD --platforms=all \ --notify=pavlo@cs.wisc.edu --test-args=btdebug \ --test-src=/space/home/pavlo/V6_7-branch/condor-6.7.15.tar.gz {endcode} {subsection: Using a Workspace Directory to Test a change to the HTCondor NMI test glue} Now, we will submit a new test using a previous build result. The *nmi-glue* option is where the system will get the test nmi_glue to run against the build results. Again, make sure that you give the full path to this option (don't just use ./). ALSO, make sure you test your glue changes against a Unix and a Windows platform!!!! Notice the change to --platforms! {code} grandcentral:~/V6_7-branch]$ condor_nmi_submit --test --buildid=16426 \ --tag=BUILD-V6_7-branch-2005-12-19 --module=NONE --platforms=x86_winnt_5.1,x86_rh_9 \ --test-args=btdebug \ --test-src=/home/bt/V6_7-branch/condor-6.7.15.tar.gz \ --nmi-glue=/home/bt/nmi_glue {endcode} {subsection: Using a Workspace Directory to Test a change to the NMI framework} There are times that the "Framework" itself needs to be changed and tested. In this case you have to configure your environment and the copy of the framework you are testing. Do the following in order: *: Check out a copy of the framework *: export CVSROOT=/p/condor/repository/nmi *: cvs co nwo/framework *: Pick a "prefix", lets say /home/bt/fw *: cd nwo/framework *: perl Makefile.Pl prefix=/home/bt/fw *: make install *: export NMI_BIN=/home/bt/fw/bin *: export NMI_LIB=/home/bt/fw/lib *: source /home/bt/fw/bin/config.sh *: cp /nmi/etc/nmi.conf /home/bt/fw/etc *: vi /home/bt/fw/etc/nmi.conf *: change nmiprefix/ *: change admin_email {code} grandcentral:~/V6_7-branch]$ condor_nmi_submit --test --buildid=16426 \ --tag=BUILD-V6_7-branch-2005-12-19 --module=V6_7_BUILD --platforms=x86_winnt_5.1,x86_rh_9 \ --test-args=btdebug --nmiconf=/home/bt/fw/etc/nmi.conf \ --test-src=/home/bt/V6_7-branch/condor-6.7.15.tar.gz \ --nmi-glue=/home/bt/nmi_glue {endcode}