/// <summary>
        /// Run a simple test that looks for errors and warnings
        /// </summary>
        /// <param name="configureMe"></param>
        private static void RunSimpleTestForErrorsAndWarnings(Action <TTreeQueryExecutor> configureMe)
        {
            var rootFile = TestUtils.CreateFileOfInt(20);

            // Get a simple query we can "play" with
            var q     = new QueriableDummy <TestNtupe>();
            var dude  = q.Count();
            var query = DummyQueryExectuor.LastQueryModel;

            // Ok, now we can actually see if we can make it "go".
            var exe = new TTreeQueryExecutor(new[] { rootFile.AsRemoteBashUri() }, "dude", typeof(ntuple), typeof(TestNtupe));

            configureMe(exe);

            // Look for warning or error
            var errorLines = new List <string>();

            CommandLineExecutor.AddLogEndpoint(s =>
            {
                if (s.ToLower().Contains("warning") || s.ToLower().Contains("error"))
                {
                    errorLines.Add(s);
                }
            });
            int result = exe.ExecuteScalar <int>(query);

            foreach (var l in errorLines)
            {
                Console.WriteLine("************ Contains error or warning: " + l);
            }

            Assert.AreEqual(0, errorLines.Count, "See std out for list of error liens");
        }
        public void LocalBashCmdLineDictifyClasses()
        {
            var rootFile = TestUtils.CreateFileOfInt(20);

            // Load up an extra dictionary
            ntuple._gClassesToDeclare         = new[] { "vector<vector<vector<float>>>" };
            ntuple._gClassesToDeclareIncludes = new[] { "vector" };

            // Get a simple query we can "play" with
            var q     = new QueriableDummy <TestNtupe>();
            var dude  = q.Where(r => LocalBashCmdLineDictifyClassesHelpers.DoDictDump() > 0).Count();
            var query = DummyQueryExectuor.LastQueryModel;

            // Ok, now we can actually see if we can make it "go".
            var exe = new TTreeQueryExecutor(new[] { rootFile.AsLocalBashUri() }, "dude", typeof(ntuple), typeof(TestNtupe));

            exe.CleanupQuery = false;

            bool seenTDataType = false;

            CommandLineExecutor.AddLogEndpoint(s =>
            {
                seenTDataType |= s.Contains("TDataType");
                Console.WriteLine(s);
            });

            int result = exe.ExecuteScalar <int>(query);

            Assert.IsTrue(seenTDataType);
        }
        public void RemoteBashCmdLineCheckDebugDumps()
        {
            // When we run in debug mode, make sure the command line dumps are there.
            var rootFile = TestUtils.CreateFileOfInt(20);

            // Get a simple query we can "play" with
            var q     = new QueriableDummy <TestNtupe>();
            var dude  = q.Count();
            var query = DummyQueryExectuor.LastQueryModel;

            // Ok, now we can actually see if we can make it "go".
            var exe = new TTreeQueryExecutor(new[] { rootFile.AsRemoteBashUri() }, "dude", typeof(ntuple), typeof(TestNtupe));

            // Capture the lines
            bool seenCacheInfo = false;

            CommandLineExecutor.AddLogEndpoint(s => seenCacheInfo |= s.ToLower().Contains("cache"));
            exe.CompileDebug = true;
            int result = exe.ExecuteScalar <int>(query);

            Assert.IsTrue(seenCacheInfo);
        }