#! /usr/bin/env perl
##**************************************************************
##
## Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
## University of Wisconsin-Madison, WI.
## 
## Licensed under the Apache License, Version 2.0 (the "License"); you
## may not use this file except in compliance with the License.  You may
## obtain a copy of the License at
## 
##    http://www.apache.org/licenses/LICENSE-2.0
## 
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
##**************************************************************

use CondorTest;

#if ($ENV{NMI_PLATFORM} =~ /_win/i) {
#  $cmd = '_collector_tester.exe';
#} else {
#}
$cmd = '_consumption_policy_tester.exe';
$testdesc =  'consumption policy unit test';
$testname = "consumption_policy_unit_test";


my @expected_output =
(
'No errors detected'
);

CondorTest::SetExpected(\@expected_output);

$execute = sub
{
    my %info = @_;
    my $cluster = $info{"cluster"};
    my $name = $info{"error"};
    CondorTest::debug("condor_unit_tests executing\n",1);
};

CondorTest::RegisterExecute($testname, $execute);

my $testStatus = system($cmd);
if(($testStatus >> 8) == 0) {
    CondorTest::RegisterResult(1, "test_name", $testname);
} else {
    CondorTest::RegisterResult(0, "test_name", $testname);
}
CondorTest::EndTest();
