//===================================================================================
// 
// File: rbt-test1.kwl
// Description: Contains assorted tests.
// 
// Control flags:
// Use 1 or true, 0 or false to turn on and off sections.
// Typically preprocess and expected results only turned on for first run.
// Clean commands should erase anything created by this test.
// Command order if flag turned on:
// 1) clean, 2) pre-process, 3) expected, 4) test, 5) post-process
// 
// NOTES:
// * The following environment variables must be set before running batch test:
//     OSSIM_BATCH_TEST_DATA     Top-level dir containing all test source data
//     OSSIM_BATCH_TEST_RESULTS  Top-level dir containing all test results (exp, 
//                               out and log),
// 
// * The variables OBT_EXP_DIR and OBT_OUT_DIR are assigned during run-time to
//   the proper paths according to the config filename. It isn't required to replace
//   these nor predefine them in the environment. You can leave them as is or modify
//   the paths to your unconventional file paths.
// 
// * In order to preserve platform independence, please utilize the following 
//   variables for the common OS commands when adding new commands to the test
//   configuration KWL file. Examples are provided in this template
//       $(DIFF_CMD) Use this var for windows "fc" or linux "diff"
//       $(COPY_CMD) Use this var for windows "copy" or linux "cp"
//       $(MKDIR_CMD) Use this var for windows "mkdir" or linux "mkdir"
//       $(RM_CMD) Use this var for windows "del /Q" or linux "rm -f"
//       $(RMDIR_CMD) Use this var for windows "rmdir /S /Q" or linux "rm -rf"
//   This application will set the environment variables to the proper values at 
//   runtime, so no need to worry about defining these.
// 
// * Use forward slashes "//", at beginning of line for comments.
// 
// * You can use existing environment variables as $(YOUR_VARIABLE). They will be 
//   expanded at run time if valid.
// 
// * Clean, preprocess, run, and accept test sections can be switched on or off
//   at run time.  These override config file flags.  Optional arguments are:
//      -c or --clean-test
//      -p or --preprocess-test
//      -r or --run-test
//      -a or --accept-test
//   Multiple tests can be entered by quoting string of space separated
//   test, e.g. "test1 test2". To accept all tests use "all" for test.
// 
//===================================================================================

// ---
// Begin test1:
// ---
test1.name: test1
test1.description: ossimGeneralRasterWriter bip test
test1.enabled: 1

// ---
// Commands to generate expected results:
// ---

// Write the image:
test1.expected_results_command0: ossim-icp general_raster_bip $(OSSIM_BATCH_TEST_DATA)/public/tif/ls7-ff-fusion.tif $(OBT_OUT_DIR)/Clinton-bip-exp.ras

// Build overviews:
test1.expected_results_command1: ossim-preproc -r -o --ch $(OBT_OUT_DIR)/Clinton-bip-exp.ras

// Info dump to expected results dir:
test1.expected_results_command2: ossim-info -i -p $(OBT_OUT_DIR)/Clinton-bip-exp.ras > $(OBT_EXP_DIR)/test1-info.txt

// Copy histogram to expected results dir:
test1.expected_results_command3: $(COPY_CMD)  $(OBT_OUT_DIR)/Clinton-bip-exp.his $(OBT_EXP_DIR)/test1-his.txt

// ---
// The actual commands to test:
// ---

// Write the image:
test1.test_command0: ossim-icp general_raster_bip $(OSSIM_BATCH_TEST_DATA)/public/tif/ls7-ff-fusion.tif $(OBT_OUT_DIR)/Clinton-bip-out.ras

// Build overviews:
test1.test_command1: ossim-preproc -r -o --ch $(OBT_OUT_DIR)/Clinton-bip-out.ras

// Info dump to expected results dir:
test1.test_command2: ossim-info -i -p $(OBT_OUT_DIR)/Clinton-bip-out.ras > $(OBT_OUT_DIR)/test1-info.txt

// Copy histogram to expected results dir:
test1.test_command3: $(COPY_CMD)  $(OBT_OUT_DIR)/Clinton-bip-out.his $(OBT_OUT_DIR)/test1-his.txt

// ---
// Post process commands for diffs and stuff:
// ---

// Test for info dump diffs:
test1.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)/test1-info.txt $(OBT_OUT_DIR)/test1-info.txt

// Test for histogram diffs:
test1.postprocess_command1: $(DIFF_CMD) $(OBT_EXP_DIR)/test1-his.txt $(OBT_OUT_DIR)/test1-his.txt


// ---
// Begin test2:
// ---
test2.name: test2
test2.description: ossimGeneralRasterWriter bil test
test2.enabled: 1

// ---
// Commands to generate expected results:
// ---

// Write the image:
test2.expected_results_command0: ossim-icp general_raster_bil $(OSSIM_BATCH_TEST_DATA)/public/tif/ls7-ff-fusion.tif $(OBT_OUT_DIR)/Clinton-bil-exp.ras

// Build overviews:
test2.expected_results_command1: ossim-preproc -r -o --ch $(OBT_OUT_DIR)/Clinton-bil-exp.ras

// Info dump to expected results dir:
test2.expected_results_command2: ossim-info -i -p $(OBT_OUT_DIR)/Clinton-bil-exp.ras > $(OBT_EXP_DIR)/test2-info.txt

// Copy histogram to expected results dir:
test2.expected_results_command3: $(COPY_CMD)  $(OBT_OUT_DIR)/Clinton-bil-exp.his $(OBT_EXP_DIR)/test2-his.txt

// ---
// The actual commands to test:
// ---

// Write the image:
test2.test_command0: ossim-icp general_raster_bil $(OSSIM_BATCH_TEST_DATA)/public/tif/ls7-ff-fusion.tif $(OBT_OUT_DIR)/Clinton-bil-out.ras

// Build overviews:
test2.test_command1: ossim-preproc -r -o --ch $(OBT_OUT_DIR)/Clinton-bil-out.ras

// Info dump to expected results dir:
test2.test_command2: ossim-info -i -p $(OBT_OUT_DIR)/Clinton-bil-out.ras > $(OBT_OUT_DIR)/test2-info.txt

// Copy histogram to expected results dir:
test2.test_command3: $(COPY_CMD)  $(OBT_OUT_DIR)/Clinton-bil-out.his $(OBT_OUT_DIR)/test2-his.txt

// ---
// Post process commands for diffs and stuff:
// ---

// Test for info dump diffs:
test2.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)/test2-info.txt $(OBT_OUT_DIR)/test2-info.txt

// Test for histogram diffs:
test2.postprocess_command1: $(DIFF_CMD) $(OBT_EXP_DIR)/test2-his.txt $(OBT_OUT_DIR)/test2-his.txt


// ---
// Begin test3:
// ---
test3.name: test3
test3.description: ossimGeneralRasterWriter bsq test
test3.enabled: 1

// ---
// Commands to generate expected results:
// ---

// Write the image:
test3.expected_results_command0: ossim-icp general_raster_bsq $(OSSIM_BATCH_TEST_DATA)/public/tif/ls7-ff-fusion.tif $(OBT_OUT_DIR)/Clinton-bsq-exp.ras

// Build overviews:
test3.expected_results_command1: ossim-preproc -r -o --ch $(OBT_OUT_DIR)/Clinton-bsq-exp.ras

// Info dump to expected results dir:
test3.expected_results_command2: ossim-info -i -p $(OBT_OUT_DIR)/Clinton-bsq-exp.ras > $(OBT_EXP_DIR)/test3-info.txt

// Copy histogram to expected results dir:
test3.expected_results_command3: $(COPY_CMD)  $(OBT_OUT_DIR)/Clinton-bsq-exp.his $(OBT_EXP_DIR)/test3-his.txt

// ---
// The actual commands to test:
// ---

// Write the image:
test3.test_command0: ossim-icp general_raster_bsq $(OSSIM_BATCH_TEST_DATA)/public/tif/ls7-ff-fusion.tif $(OBT_OUT_DIR)/Clinton-bsq-out.ras

// Build overviews:
test3.test_command1: ossim-preproc -r -o --ch $(OBT_OUT_DIR)/Clinton-bsq-out.ras

// Info dump to expected results dir:
test3.test_command2: ossim-info -i -p $(OBT_OUT_DIR)/Clinton-bsq-out.ras > $(OBT_OUT_DIR)/test3-info.txt

// Copy histogram to expected results dir:
test3.test_command3: $(COPY_CMD)  $(OBT_OUT_DIR)/Clinton-bsq-out.his $(OBT_OUT_DIR)/test3-his.txt

// ---
// Post process commands for diffs and stuff:
// ---

// Test for info dump diffs:
test3.postprocess_command0: $(DIFF_CMD) $(OBT_EXP_DIR)/test3-info.txt $(OBT_OUT_DIR)/test3-info.txt

// Test for histogram diffs:
test3.postprocess_command1: $(DIFF_CMD) $(OBT_EXP_DIR)/test3-his.txt $(OBT_OUT_DIR)/test3-his.txt
