Package com.github.maven_nar.cpptasks

Examples of com.github.maven_nar.cpptasks.TargetHistoryTable


    public void testLoadOpenshore() throws IOException {
        try {
            copyResourceToTmpDir("openshore/history.xml", "history.xml");
            CCTask task = new CCTask();
            String tmpDir = System.getProperty("java.io.tmpdir");
            TargetHistoryTable history = new TargetHistoryTable(task, new File(
                    tmpDir));
        } finally {
            deleteTmpFile("history.xml");
        }
    }
View Full Code Here


    public void testLoadXerces() throws IOException {
        try {
            copyResourceToTmpDir("xerces-c/history.xml", "history.xml");
            CCTask task = new CCTask();
            String tmpDir = System.getProperty("java.io.tmpdir");
            TargetHistoryTable history = new TargetHistoryTable(task, new File(
                    tmpDir));
        } finally {
            deleteTmpFile("history.xml");
        }
    }
View Full Code Here

            File historyFile = new File(tempDir, "history.xml");
            historyFile.deleteOnExit();
            if (historyFile.exists()) {
                historyFile.delete();
            }
            TargetHistoryTable table = new TargetHistoryTable(null, new File(
                    tempDir));
            //
            //  create a dummy compiled unit
            //
            compiledFile = new File(tempDir, "dummy.o");
            FileOutputStream compiledStream = new FileOutputStream(compiledFile);
            compiledStream.close();
            //
            //   lastModified times can be slightly less than
            //      task start time due to file system resolution.
            //      Mimic this by slightly incrementing the last modification time.
            //     
            long startTime = compiledFile.lastModified() + 1;
            //
            //   update the table
            //
            table.update(new MockProcessorConfiguration(),
                    new String[]{"dummy.o"}, null);
            //
            //   commit. If "compiled" file was judged to be
            //   valid we should have a history file.
            //
            table.commit();
            historyFile = table.getHistoryFile();
            assertTrue("History file was not created", historyFile.exists());
            assertTrue("History file was empty", historyFile.length() > 10);
        } finally {
            if (compiledFile != null && compiledFile.exists()) {
                compiledFile.delete();
View Full Code Here

    public void testLoadOpenshore() throws IOException {
        try {
            copyResourceToTmpDir("openshore/history.xml", "history.xml");
            CCTask task = new CCTask();
            String tmpDir = System.getProperty("java.io.tmpdir");
            TargetHistoryTable history = new TargetHistoryTable(task, new File(
                    tmpDir));
        } finally {
            deleteTmpFile("history.xml");
        }
    }
View Full Code Here

    public void testLoadXerces() throws IOException {
        try {
            copyResourceToTmpDir("xerces-c/history.xml", "history.xml");
            CCTask task = new CCTask();
            String tmpDir = System.getProperty("java.io.tmpdir");
            TargetHistoryTable history = new TargetHistoryTable(task, new File(
                    tmpDir));
        } finally {
            deleteTmpFile("history.xml");
        }
    }
View Full Code Here

            File historyFile = new File(tempDir, "history.xml");
            historyFile.deleteOnExit();
            if (historyFile.exists()) {
                historyFile.delete();
            }
            TargetHistoryTable table = new TargetHistoryTable(null, new File(
                    tempDir));
            //
            //  create a dummy compiled unit
            //
            compiledFile = new File(tempDir, "dummy.o");
            FileOutputStream compiledStream = new FileOutputStream(compiledFile);
            compiledStream.close();
            //
            //   lastModified times can be slightly less than
            //      task start time due to file system resolution.
            //      Mimic this by slightly incrementing the last modification time.
            //     
            long startTime = compiledFile.lastModified() + 1;
            //
            //   update the table
            //
            table.update(new MockProcessorConfiguration(),
                    new String[]{"dummy.o"}, null);
            //
            //   commit. If "compiled" file was judged to be
            //   valid we should have a history file.
            //
            table.commit();
            historyFile = table.getHistoryFile();
            assertTrue("History file was not created", historyFile.exists());
            assertTrue("History file was empty", historyFile.length() > 10);
        } finally {
            if (compiledFile != null && compiledFile.exists()) {
                compiledFile.delete();
View Full Code Here

TOP

Related Classes of com.github.maven_nar.cpptasks.TargetHistoryTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.