Example #1
0
        public void DxAODDatasetSlightlyDifferent()
        {
            // Seen in the wild. Need to take into account the fact that there might be subtle differences in the dataset names.
            var j = new AtlasJob()
            {
                Name = "DiVertAnalysis", Version = 22
            };
            var ds1 = j.ResultingDataSetName("user.emmat.361023.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ3W.merge.AOD.e3668_s2576_s2132_r6765_r6282__EXOT15_EXT0", "user.bogus");
            var ds2 = j.ResultingDataSetName("user.emmat.361023.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ3W.merge.AOD.e3669_s2576_s2132_r6765_r6282__EXOT15_EXT0", "user.bogus");

            Assert.AreNotEqual(ds1, ds2);
        }
Example #2
0
        public void HashIsDifferent()
        {
            var j = new AtlasJob()
            {
                Name = "Hi there", Version = 12
            };
            var h1 = j.Hash();

            j.Name = "not there";
            var h2 = j.Hash();

            Assert.AreNotEqual(h1, h2);
        }
Example #3
0
        public void HashNotSame()
        {
            var j1 = new AtlasJob()
            {
                Name = "DiVertAnalysiss", Version = 22
            };
            var j2 = new AtlasJob()
            {
                Name = "DiVertAnalysis", Version = 22
            };

            Assert.AreNotEqual(j1.Hash(), j2.Hash());
        }
Example #4
0
        public void HashSameForReorderedPackages()
        {
            var j1 = new AtlasJob()
            {
                Name     = "DiVertAnalysis", Version = 22,
                Packages = new Package[]
                {
                    new Package()
                    {
                        Name = "pkg1", SCTag = "v00-00-00"
                    },
                    new Package()
                    {
                        Name = "pkg2", SCTag = "v00-01-00"
                    }
                },
            };
            var j2 = new AtlasJob()
            {
                Name     = "DiVertAnalysis",
                Version  = 22,
                Packages = new Package[]
                {
                    new Package()
                    {
                        Name = "pkg2", SCTag = "v00-01-00"
                    },
                    new Package()
                    {
                        Name = "pkg1", SCTag = "v00-00-00"
                    },
                },
            };

            Assert.AreEqual(j1.Hash(), j2.Hash());
        }
Example #5
0
        public static Dictionary <string, string> AddSubmitInfo(this Dictionary <string, string> source, AtlasJob j, string submitCommand = "submit")
        {
            var d = new Dictionary <string, string>()
            {
                { "rm -rf /tmp/ds1-out", "" },
                { "lsetup panda", "" },
                { "mkdir /tmp/ds1-out", "" },
                { "cd /tmp/ds1-out", "" },
                { "rcSetup notmyrelease", "Found ASG release with" },
                { "echo fubar | kinit [email protected]", "Password for [email protected]: " },
                { $"rc checkout_pkg {j.Packages[0].Name}/trunk@tag", "Checked out revision" },
                { "mv trunk@tag hithere", "" },
                { "rc find_packages", "" },
                { "rc compile", "" },
                { "ls", "" },
                { "echo $?", "0" },
                { submitCommand, "dude" }
            };

            return(source.AddEntry(d));
        }
Example #6
0
 public async Task SubmitCommandWithMissingPattern()
 {
     AtlasJob j = MakePatternJob();
     var      s = new DummySSHConnection(new Dictionary <string, string>().AddSubmitInfo(j, "ds1_submit"));
     await s.SubmitJobAsync(j, "ds3", "ds1-out", credSet : "bogus");
 }
Example #7
0
 public async Task SubmitCommandWithGlobal()
 {
     AtlasJob j = MakeSimpleJob();
     var      s = new DummySSHConnection(new Dictionary <string, string>().AddSubmitInfo(j));
     await s.SubmitJobAsync(j, "ds1", "ds1-out", credSet : "bogus");
 }