~ubuntu-branches/ubuntu/precise/nordugrid-arc/precise

« back to all changes in this revision

Viewing changes to src/hed/acc/JobDescriptionParser/test/ARCJSDLParserTest.cpp

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-03-01 19:48:16 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120301194816-m1ezrwnwt2qgnc2e
Tags: 1.1.1-1
* 1.1.1 Bugfix Release
* Fixes FTBFS (Closes: #661774) (LP: #935007)
* Fix typo in package description (Closes: #646979)
* Split binary rule in debian/rules for arch and indep

Show diffs side-by-side

added added

removed removed

Lines of Context:
357
357
 
358
358
void ARCJSDLParserTest::TestURIOptionsInput() {
359
359
  std::string jsdl = "<?xml version=\"1.0\"?>"
360
 
"<JobDefinition>"
 
360
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
361
361
  "<JobDescription>"
362
362
    "<Application>"
363
363
      "<posix-jsdl:POSIXApplication>"
386
386
 
387
387
void ARCJSDLParserTest::TestURIOptionsOutput() {
388
388
  std::string jsdl = "<?xml version=\"1.0\"?>"
389
 
"<JobDefinition>"
 
389
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
390
390
  "<JobDescription>"
391
391
    "<Application>"
392
392
      "<posix-jsdl:POSIXApplication>"
433
433
 
434
434
void ARCJSDLParserTest::TestQueue() {
435
435
  std::string jsdl = "<?xml version=\"1.0\"?>"
436
 
"<JobDefinition>"
 
436
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
437
437
"<JobDescription>"
438
438
"<Application>"
439
439
"<posix-jsdl:POSIXApplication>"
460
460
  CPPUNIT_ASSERT_EQUAL(0, (int)OUTJOBS.front().GetAlternatives().size());
461
461
 
462
462
  jsdl = "<?xml version=\"1.0\"?>"
463
 
"<JobDefinition>"
 
463
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
464
464
"<JobDescription>"
465
465
"<Application>"
466
466
"<posix-jsdl:POSIXApplication>"
494
494
 
495
495
void ARCJSDLParserTest::TestDryRun() {
496
496
  std::string jsdl = "<?xml version=\"1.0\"?>"
497
 
"<JobDefinition>"
 
497
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
498
498
"<JobDescription>"
499
499
"<Application>"
500
500
"<Executable>"
519
519
  CPPUNIT_ASSERT_EQUAL(0, (int)OUTJOBS.front().GetAlternatives().size());
520
520
 
521
521
  jsdl = "<?xml version=\"1.0\"?>"
522
 
"<JobDefinition>"
 
522
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
523
523
"<JobDescription>"
524
524
"<Application>"
525
525
"<Executable>"
550
550
  MESSAGE = "Error: The parser does not comply with the JDSL POSIX specification.";
551
551
 
552
552
  const std::string posixJSDLStr = "<?xml version=\"1.0\"?>"
553
 
"<JobDefinition>"
 
553
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
554
554
"<JobDescription>"
555
555
"<Application>"
556
556
"<posix-jsdl:POSIXApplication>"
565
565
"<posix-jsdl:Environment name=\"var2\">value2</posix-jsdl:Environment>"
566
566
"<posix-jsdl:Environment name=\"var3\">value3</posix-jsdl:Environment>"
567
567
"<posix-jsdl:WallTimeLimit>50</posix-jsdl:WallTimeLimit>"
568
 
"<posix-jsdl:MemoryLimit>100</posix-jsdl:MemoryLimit>"
 
568
"<posix-jsdl:MemoryLimit>104857600</posix-jsdl:MemoryLimit>"
569
569
"<posix-jsdl:CPUTimeLimit>110</posix-jsdl:CPUTimeLimit>"
570
570
"<posix-jsdl:ProcessCountLimit>2</posix-jsdl:ProcessCountLimit>"
571
571
"<posix-jsdl:VirtualMemoryLimit>500</posix-jsdl:VirtualMemoryLimit>"
630
630
  CPPUNIT_ASSERT_EQUAL_MESSAGE("POSIX compliance failure", (std::string)"value3", (std::string)pApp["Environment"][2]);
631
631
 
632
632
  CPPUNIT_ASSERT_EQUAL_MESSAGE("POSIX compliance failure", INJOB.Resources.TotalWallTime.range.max, Arc::stringto<int>(pApp["WallTimeLimit"]));
633
 
  CPPUNIT_ASSERT_EQUAL_MESSAGE("POSIX compliance failure", INJOB.Resources.IndividualPhysicalMemory.max, Arc::stringto<int>(pApp["MemoryLimit"]));
 
633
  CPPUNIT_ASSERT_EQUAL_MESSAGE("POSIX compliance failure", INJOB.Resources.IndividualPhysicalMemory.max, (int)(Arc::stringto<long long>(pApp["MemoryLimit"])/(1024*1024)));
634
634
  CPPUNIT_ASSERT_EQUAL_MESSAGE("POSIX compliance failure", INJOB.Resources.TotalCPUTime.range.max, Arc::stringto<int>(pApp["CPUTimeLimit"]));
635
635
  CPPUNIT_ASSERT_EQUAL_MESSAGE("POSIX compliance failure", INJOB.Resources.SlotRequirement.NumberOfSlots.max, Arc::stringto<int>(pApp["ProcessCountLimit"]));
636
636
  CPPUNIT_ASSERT_EQUAL_MESSAGE("POSIX compliance failure", INJOB.Resources.IndividualVirtualMemory.max, Arc::stringto<int>(pApp["VirtualMemoryLimit"]));
643
643
  MESSAGE = "Error: The parser does not comply with the JSDL HPC Profile Application Extension specification.";
644
644
 
645
645
  const std::string hpcJSDLStr = "<?xml version=\"1.0\"?>"
646
 
"<JobDefinition>"
 
646
"<JobDefinition xmlns=\"http://schemas.ggf.org/jsdl/2005/11/jsdl\">"
647
647
"<JobDescription>"
648
648
"<Application>"
649
649
"<HPC-jsdl:HPCProfileApplication>"