Commit 75b86b66 authored by Kelvin Rodriguez's avatar Kelvin Rodriguez
Browse files

fixed some false positives

parent 51ac0603
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -65,8 +65,9 @@ if(DIFFERENT)
    message(FATAL_ERROR "Test failed - files differ")
    # On error the result file is left around to aid in debugging.
else()
  # file(REMOVE ${outputFile}) # On success, clean out the result file.
  file(REMOVE ${outputFile}) # On success, clean out the result file.
  execute_process(COMMAND rm -rf ${tempdir})
endif()

# Clean up our temporary folder
execute_process(COMMAND rm -f ${truthFolder}/${binName}.xml)
execute_process(COMMAND rm -f ${truthFolder}/unitTest)
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ class ImportPdsTableTester : public ImportPdsTable {
 */
int main(int argc, char *argv[]) {
  Isis::Preference::Preferences(true);
  Isis::FileName data("$ISISROOT/src/base/objs/ImportPdsTable/data/");
  Isis::FileName data("data/");

  QString inputFile = data.expanded() + "VIR_IR_1A_1_332974737_1_HK.LBL";
  if (--argc == 1) { inputFile = argv[1]; }
+36 −34
Original line number Diff line number Diff line
@@ -4,39 +4,41 @@ Testing ls, grep, sed and pipes ...

ProgramLauncher.cpp
ProgramLauncher.h
ProgramLauncher.o
ProgramLauncher.truth
Testing stats ... 

greyscale: Working
0% Processed
10% Processed
20% Processed
30% Processed
40% Processed
50% Processed
60% Processed
70% Processed
80% Processed
90% Processed
100% Processed
hist: Computing min/max for histogram
0% Processed
10% Processed
20% Processed
30% Processed
40% Processed
50% Processed
60% Processed
70% Processed
80% Processed
90% Processed
100% Processed
hist: Gathering histogram
0% Processed
10% Processed
20% Processed
30% Processed
40% Processed
50% Processed
60% Processed
70% Processed
80% Processed
90% Processed
100% Processed
Group = Results
  From                    = /usgs/cpkgs/isis3/data/base/testData/ab102401_ide-
                            al.cub
  From                    = unitTest.cub
  Band                    = 1
  Average                 = 0.040536894512714
  StandardDeviation       = 0.01519314883071
  Variance                = 2.30831771392117e-04
  Median                  = 0.037797920878468
  Mode                    = 0.034160507255072
  Skew                    = 0.54083067271281
  Minimum                 = 0.010204331949353
  Maximum                 = 0.095491595566273
  Sum                     = 31525.745547011
  TotalPixels             = 1152000
  ValidPixels             = 777705
  Average                 = 24.999999961853
  StandardDeviation       = 14.728323083889
  Variance                = 216.92350086341
  Median                  = 24.489967193103
  Mode                    = 0.0
  Skew                    = 0.10388815464838
  Minimum                 = 0.0
  Maximum                 = 50.0
  Sum                     = 62499.999904633
  TotalPixels             = 2500
  ValidPixels             = 2500
  OverValidMaximumPixels  = 0
  UnderValidMinimumPixels = 0
  NullPixels              = 353897
  NullPixels              = 0
  LisPixels               = 0
  LrsPixels               = 0
  HisPixels               = 0
  HrsPixels               = 20398
  HrsPixels               = 0
End_Group

Testing malformed command... 
NOTE: The exit code for this test differs on each OS.
That is the reason for the OS specific truth files. Please ignore the exit codes.

sh: -c: line 0: unexpected EOF while looking for matching `''
sh: -c: line 1: syntax error: unexpected end of file
@@ -47,10 +49,11 @@ Testing non-existant Isis 3 program...
**ERROR** Program [chocolatelab] does not appear to be a valid Isis 3 program.

Testing using Isis 3 program as a system program... 
NOTE: The exit code for this test differs on each OS.
That is the reason for the OS specific truth files. Please ignore the exit codes.

terminate called after throwing an instance of 'Isis::IException'
  what():  **ERROR** This process (program) was executed by an existing Isis 3 process. However, we failed to establish a communication channel with the parent (launcher) process. The parent process has a PID of [999].
**PROGRAMMER ERROR** Executing command [$ISISROOT/bin/stats from=\$base/testData/ab102401_ideal.cub -pid=999 -preference=\$ISISROOT/src/base/objs/Preference/TestPreferences] failed with return status [6].
libc++abi.dylib: terminating with uncaught exception of type Isis::IException: **ERROR** This process (program) was executed by an existing Isis 3 process. However, we failed to establish a communication channel with the parent (launcher) process. The parent process has a PID of [999].
**PROGRAMMER ERROR** Executing command [$ISISROOT/bin/stats from=\$base/testData/ab102401_ideal.cub -pid=999 -preference=\$ISISROOT/TestPreferences] failed with return status [6].

Testing using Isis 3 program as a system program without pid... 

@@ -59,25 +62,24 @@ stats: Computing min/max for histogram
stats: Gathering histogram
0% Processed
10% Processed
20% Processed
30% Processed
40% Processed
50% Processed
60% Processed
70% Processed
80% Processed
90% Processed
100% Processed
Group = Results
  From                    = /usgs/cpkgs/isis3/data/base/testData/ab102401_ide-
                            al.cub
  From                    = unitTest.cub
  Band                    = 1
  Average                 = 0.040536894512714
  StandardDeviation       = 0.01519314883071
  Variance                = 2.30831771392117e-04
  Median                  = 0.037797920878468
  Mode                    = 0.034160507255072
  Skew                    = 0.54083067271281
  Minimum                 = 0.010204331949353
  Maximum                 = 0.095491595566273
  Sum                     = 31525.745547011
  TotalPixels             = 1152000
  ValidPixels             = 777705
  Average                 = 24.999999961853
  StandardDeviation       = 14.728323083889
  Variance                = 216.92350086341
  Median                  = 24.489967193103
  Mode                    = 0.0
  Skew                    = 0.10388815464838
  Minimum                 = 0.0
  Maximum                 = 50.0
  Sum                     = 62499.999904633
  TotalPixels             = 2500
  ValidPixels             = 2500
  OverValidMaximumPixels  = 0
  UnderValidMinimumPixels = 0
  NullPixels              = 353897
  NullPixels              = 0
  LisPixels               = 0
  LrsPixels               = 0
  HisPixels               = 0
  HrsPixels               = 20398
  HrsPixels               = 0
End_Group
+1 −2
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@ Testing ls, grep, sed and pipes ...

ProgramLauncher.cpp
ProgramLauncher.h
ProgramLauncher.o
ProgramLauncher.truth
Testing stats ... 

@@ -54,7 +53,7 @@ NOTE: The exit code for this test differs on each OS.
That is the reason for the OS specific truth files. Please ignore the exit codes.

libc++abi.dylib: terminating with uncaught exception of type Isis::IException: **ERROR** This process (program) was executed by an existing Isis 3 process. However, we failed to establish a communication channel with the parent (launcher) process. The parent process has a PID of [999].
**PROGRAMMER ERROR** Executing command [$ISISROOT/bin/stats from=\$base/testData/ab102401_ideal.cub -pid=999 -preference=\$ISISROOT/src/base/objs/Preference/TestPreferences] failed with return status [6].
**PROGRAMMER ERROR** Executing command [$ISISROOT/bin/stats from=\$base/testData/ab102401_ideal.cub -pid=999 -preference=\$ISISROOT/TestPreferences] failed with return status [6].

Testing using Isis 3 program as a system program without pid... 

+4 −4
Original line number Diff line number Diff line
@@ -25,11 +25,11 @@ void IsisMain() {
  cerr << "Testing stats ... " << endl;
  cerr << endl;
  ProgramLauncher::RunSystemCommand("greyscale to=unitTest.cub enddn=50.0 samples=50 lines=50 "
        "-preference=$ISISROOT/src/base/objs/Preference/TestPreferences");
        "-preference=$ISISROOT/TestPreferences");

  ProgramLauncher::RunIsisProgram("stats",
        "from=unitTest.cub "
        "-preference=$ISISROOT/src/base/objs/Preference/TestPreferences");
        "-preference=$ISISROOT/TestPreferences");

  cerr << endl;
  cerr << "Testing malformed command... " << endl;
@@ -65,7 +65,7 @@ void IsisMain() {
  try {
    ProgramLauncher::RunSystemCommand("$ISISROOT/bin/stats "
        "from=\\$base/testData/ab102401_ideal.cub -pid=999 "
        "-preference=\\$ISISROOT/src/base/objs/Preference/TestPreferences");
        "-preference=\\$ISISROOT/TestPreferences");
  }
  catch(IException &e) {
    e.print();
@@ -79,7 +79,7 @@ void IsisMain() {
  try {
    ProgramLauncher::RunSystemCommand("$ISISROOT/bin/stats "
        "from=unitTest.cub "
        "-preference=\\$ISISROOT/src/base/objs/Preference/TestPreferences");
        "-preference=\\$ISISROOT/TestPreferences");
  }
  catch(IException &e) {
    e.print();