diff --git a/tests/BakeTestRunner.java b/tests/BakeTestRunner.java deleted file mode 100644 index cce3d54..0000000 --- a/tests/BakeTestRunner.java +++ /dev/null @@ -1,748 +0,0 @@ -import javax.swing.*; -import javax.swing.border.EmptyBorder; -import javax.swing.table.DefaultTableModel; -import javax.swing.text.DefaultCaret; -import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.io.*; -import java.nio.file.*; -import java.nio.file.attribute.BasicFileAttributes; -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -public class BakeTestRunner extends JFrame { - private JPanel mainPanel; - private JTable testTable; - private DefaultTableModel tableModel; - private JTextArea logArea; - private JButton runSelectedButton; - private JButton runAllButton; - private JComboBox<String> languageComboBox; - private JProgressBar progressBar; - private JButton openLogsButton; - private JButton compareSelectedButton; - - private final ExecutorService executor = Executors.newSingleThreadExecutor(); - private final String baseDir = System.getProperty("user.dir"); - private final String logsDir = baseDir + File.separator + "logs"; - private final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - - private final Color PASSED_COLOR = new Color(220, 255, 220); - private final Color FAILED_COLOR = new Color(255, 220, 220); - private final Color RUNNING_COLOR = new Color(220, 220, 255); - - enum TestStatus { - NOT_RUN, RUNNING, PASSED, FAILED - } - - public BakeTestRunner() { - setTitle("Bake Test Runner"); - setSize(1000, 700); - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - setLocationRelativeTo(null); - - setupUI(); - loadTests(); - createLogsDirectory(); - } - - private void setupUI() { - mainPanel = new JPanel(new BorderLayout(10, 10)); - mainPanel.setBorder(new EmptyBorder(10, 10, 10, 10)); - - // Top panel with controls - JPanel controlPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 5)); - runSelectedButton = new JButton("Run Selected Tests"); - runAllButton = new JButton("Run All Tests"); - compareSelectedButton = new JButton("Compare Selected Test"); - languageComboBox = new JComboBox<>(new String[]{"All", "C", "Java"}); - openLogsButton = new JButton("Open Logs Directory"); - - controlPanel.add(runSelectedButton); - controlPanel.add(runAllButton); - controlPanel.add(compareSelectedButton); - controlPanel.add(new JLabel("Language:")); - controlPanel.add(languageComboBox); - controlPanel.add(openLogsButton); - - // Table for test list - String[] columnNames = {"#", "Language", "Test Name", "Status", "Last Run"}; - tableModel = new DefaultTableModel(columnNames, 0) { - @Override - public boolean isCellEditable(int row, int column) { - return false; - } - }; - testTable = new JTable(tableModel); - testTable.getColumnModel().getColumn(0).setPreferredWidth(30); - testTable.getColumnModel().getColumn(1).setPreferredWidth(70); - testTable.getColumnModel().getColumn(2).setPreferredWidth(300); - testTable.getColumnModel().getColumn(3).setPreferredWidth(80); - testTable.getColumnModel().getColumn(4).setPreferredWidth(150); - testTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); - testTable.setRowHeight(25); - - // Log area - logArea = new JTextArea(); - logArea.setEditable(false); - logArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12)); - DefaultCaret caret = (DefaultCaret) logArea.getCaret(); - caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE); - - // Progress bar - progressBar = new JProgressBar(0, 100); - progressBar.setStringPainted(true); - progressBar.setString("Ready"); - - // Layout - JSplitPane splitPane = new JSplitPane( - JSplitPane.VERTICAL_SPLIT, - new JScrollPane(testTable), - new JScrollPane(logArea) - ); - splitPane.setDividerLocation(300); - - mainPanel.add(controlPanel, BorderLayout.NORTH); - mainPanel.add(splitPane, BorderLayout.CENTER); - mainPanel.add(progressBar, BorderLayout.SOUTH); - - setContentPane(mainPanel); - - // Add action listeners - runSelectedButton.addActionListener(e -> runSelectedTests()); - runAllButton.addActionListener(e -> runAllTests()); - compareSelectedButton.addActionListener(e -> compareSelectedTest()); - openLogsButton.addActionListener(e -> openLogsDirectory()); - languageComboBox.addActionListener(e -> filterTestsByLanguage()); - } - - private void createLogsDirectory() { - try { - Files.createDirectories(Paths.get(logsDir)); - } catch (IOException e) { - logMessage("Error creating logs directory: " + e.getMessage()); - } - } - - private void openLogsDirectory() { - try { - Desktop.getDesktop().open(new File(logsDir)); - } catch (IOException e) { - logMessage("Error opening logs directory: " + e.getMessage()); - JOptionPane.showMessageDialog(this, - "Could not open logs directory: " + e.getMessage(), - "Error", JOptionPane.ERROR_MESSAGE); - } - } - - private void compareSelectedTest() { - int selectedRow = testTable.getSelectedRow(); - if (selectedRow == -1) { - JOptionPane.showMessageDialog(this, - "Please select a test to compare", - "No Test Selected", JOptionPane.WARNING_MESSAGE); - return; - } - - String language = (String) tableModel.getValueAt(selectedRow, 1); - String testName = (String) tableModel.getValueAt(selectedRow, 2); - - String logFilePath = logsDir + File.separator + language + "_" + testName + ".log"; - File logFile = new File(logFilePath); - - if (!logFile.exists()) { - JOptionPane.showMessageDialog(this, - "No log file found for this test. Please run the test first.", - "Log Not Found", JOptionPane.WARNING_MESSAGE); - return; - } - - showComparisonDialog(logFile, language, testName); - } - - private void showComparisonDialog(File logFile, String language, String testName) { - JDialog dialog = new JDialog(this, "Comparison: " + language + " - " + testName, true); - dialog.setLayout(new BorderLayout(10, 10)); - dialog.setSize(1000, 600); - dialog.setLocationRelativeTo(this); - - try { - List<String> lines = Files.readAllLines(logFile.toPath()); - String content = String.join("\n", lines); - - // Split content to make and bake sections if possible - String makeOutput = ""; - String bakeOutput = ""; - - // Basic parsing - can be enhanced for better splitting - int makeIndex = content.indexOf("=== Make Output ==="); - int bakeIndex = content.indexOf("=== Bake Output ==="); - int comparisonIndex = content.indexOf("=== Comparison Results ==="); - - if (makeIndex != -1 && bakeIndex != -1) { - makeOutput = content.substring(makeIndex, bakeIndex).trim(); - if (comparisonIndex != -1) { - bakeOutput = content.substring(bakeIndex, comparisonIndex).trim(); - } else { - bakeOutput = content.substring(bakeIndex).trim(); - } - } - - JTextArea makeArea = new JTextArea(makeOutput); - JTextArea bakeArea = new JTextArea(bakeOutput); - JTextArea comparisonArea = new JTextArea(); - - if (comparisonIndex != -1) { - comparisonArea.setText(content.substring(comparisonIndex).trim()); - } else { - comparisonArea.setText("No comparison results available."); - } - - makeArea.setEditable(false); - bakeArea.setEditable(false); - comparisonArea.setEditable(false); - - makeArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12)); - bakeArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12)); - comparisonArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12)); - - JTabbedPane tabbedPane = new JTabbedPane(); - tabbedPane.addTab("Make Output", new JScrollPane(makeArea)); - tabbedPane.addTab("Bake Output", new JScrollPane(bakeArea)); - tabbedPane.addTab("Comparison", new JScrollPane(comparisonArea)); - - dialog.add(tabbedPane, BorderLayout.CENTER); - - JButton closeButton = new JButton("Close"); - closeButton.addActionListener(e -> dialog.dispose()); - - JPanel buttonPanel = new JPanel(); - buttonPanel.add(closeButton); - dialog.add(buttonPanel, BorderLayout.SOUTH); - - dialog.setVisible(true); - - } catch (IOException e) { - JOptionPane.showMessageDialog(dialog, - "Error reading log file: " + e.getMessage(), - "Error", JOptionPane.ERROR_MESSAGE); - } - } - - private void loadTests() { - tableModel.setRowCount(0); - - // Load C tests - loadTestsForLanguage("C"); - - // Load Java tests - loadTestsForLanguage("Java"); - } - - private void loadTestsForLanguage(String language) { - File languageDir = new File(baseDir + File.separator + "tests" + File.separator + language); - if (!languageDir.exists() || !languageDir.isDirectory()) { - logMessage("Warning: Directory not found: " + languageDir.getPath()); - return; - } - - File[] testDirs = languageDir.listFiles(File::isDirectory); - if (testDirs == null) { - logMessage("Warning: No test directories found in " + languageDir.getPath()); - return; - } - - Arrays.sort(testDirs, (a, b) -> { - // Extract test number for sorting - Pattern pattern = Pattern.compile("test-(\\d+)"); - Matcher matcherA = pattern.matcher(a.getName()); - Matcher matcherB = pattern.matcher(b.getName()); - - if (matcherA.find() && matcherB.find()) { - try { - int numA = Integer.parseInt(matcherA.group(1)); - int numB = Integer.parseInt(matcherB.group(1)); - return Integer.compare(numA, numB); - } catch (NumberFormatException e) { - return a.getName().compareTo(b.getName()); - } - } - return a.getName().compareTo(b.getName()); - }); - - for (File testDir : testDirs) { - String testName = testDir.getName(); - if (testName.startsWith("test-")) { - Object[] row = {tableModel.getRowCount() + 1, language, testName, "Not Run", ""}; - tableModel.addRow(row); - } - } - } - - private void filterTestsByLanguage() { - String selectedLanguage = (String) languageComboBox.getSelectedItem(); - if (selectedLanguage == null || selectedLanguage.equals("All")) { - loadTests(); - return; - } - - tableModel.setRowCount(0); - loadTestsForLanguage(selectedLanguage); - } - - private void runSelectedTests() { - int[] selectedRows = testTable.getSelectedRows(); - if (selectedRows.length == 0) { - JOptionPane.showMessageDialog(this, - "Please select at least one test to run", - "No Test Selected", JOptionPane.WARNING_MESSAGE); - return; - } - - List<TestInfo> testsToRun = new ArrayList<>(); - for (int row : selectedRows) { - String language = (String) tableModel.getValueAt(row, 1); - String testName = (String) tableModel.getValueAt(row, 2); - testsToRun.add(new TestInfo(row, language, testName)); - } - - disableButtons(); - runTests(testsToRun); - } - - private void runAllTests() { - List<TestInfo> testsToRun = new ArrayList<>(); - for (int row = 0; row < tableModel.getRowCount(); row++) { - String language = (String) tableModel.getValueAt(row, 1); - String testName = (String) tableModel.getValueAt(row, 2); - testsToRun.add(new TestInfo(row, language, testName)); - } - - disableButtons(); - runTests(testsToRun); - } - - private void disableButtons() { - runSelectedButton.setEnabled(false); - runAllButton.setEnabled(false); - compareSelectedButton.setEnabled(false); - languageComboBox.setEnabled(false); - } - - private void enableButtons() { - runSelectedButton.setEnabled(true); - runAllButton.setEnabled(true); - compareSelectedButton.setEnabled(true); - languageComboBox.setEnabled(true); - } - - private void runTests(List<TestInfo> testsToRun) { - progressBar.setValue(0); - progressBar.setString("Running tests (0/" + testsToRun.size() + ")"); - logArea.setText(""); - - executor.submit(() -> { - try { - int total = testsToRun.size(); - int current = 0; - - for (int i = 0; i < testsToRun.size(); i++) { - TestInfo test = testsToRun.get(i); - final int currentTest = i + 1; - - // Update UI to show we're running this test - SwingUtilities.invokeLater(() -> { - tableModel.setValueAt(TestStatus.RUNNING.name(), test.row, 3); - testTable.setValueAt(TestStatus.RUNNING.name(), test.row, 3); - testTable.setValueAt(dateFormat.format(new Date()), test.row, 4); - - // Highlight the row - testTable.setRowSelectionInterval(test.row, test.row); - - // Update the progress bar - progressBar.setValue((int)((double)currentTest / total * 100)); - progressBar.setString("Running tests (" + currentTest + "/" + total + ")"); - }); - - // Run the test - logMessage("\n========================================================"); - logMessage("Running Test: " + test.language + " - " + test.testName); - logMessage("========================================================"); - - boolean success = runTest(test); - - // Update UI with the result - SwingUtilities.invokeLater(() -> { - testTable.setValueAt(success ? TestStatus.PASSED.name() : TestStatus.FAILED.name(), - test.row, 3); - }); - } - - // Test run complete - SwingUtilities.invokeLater(() -> { - progressBar.setValue(100); - progressBar.setString("All tests completed"); - enableButtons(); - logMessage("\n========================================================"); - logMessage("Test run completed at " + dateFormat.format(new Date())); - logMessage("========================================================"); - }); - } catch (Exception e) { - SwingUtilities.invokeLater(() -> { - logMessage("Error running tests: " + e.getMessage()); - for (StackTraceElement element : e.getStackTrace()) { - logMessage(" " + element.toString()); - } - progressBar.setString("Error running tests"); - enableButtons(); - }); - } - }); - } - - private boolean runTest(TestInfo test) { - String testDir = baseDir + File.separator + "tests" + File.separator + - test.language + File.separator + test.testName; - - File makeDir = new File(testDir + File.separator + "make"); - File bakeDir = new File(testDir + File.separator + "bake"); - - if (!makeDir.exists() || !bakeDir.exists()) { - logMessage("Error: Make or Bake directory not found for test " + test.testName); - return false; - } - - String logFilePath = logsDir + File.separator + test.language + "_" + test.testName + ".log"; - - try (PrintWriter writer = new PrintWriter(new FileWriter(logFilePath))) { - // Header information - writer.println("Test: " + test.language + " - " + test.testName); - writer.println("Date: " + dateFormat.format(new Date())); - writer.println("========================================================"); - - // Compare initial file state - writer.println("\n=== Initial File Comparison ==="); - logMessage("Comparing initial files..."); - - Map<String, FileInfo> makeFiles = scanDirectory(makeDir); - Map<String, FileInfo> bakeFiles = scanDirectory(bakeDir); - - compareAndLogFiles(makeFiles, bakeFiles, writer); - - // Run make - writer.println("\n=== Make Output ==="); - logMessage("Running make..."); - - ProcessResult makeResult = runProcess("make", makeDir); - writer.println(makeResult.output); - logMessage(makeResult.output); - - // Run bake - writer.println("\n=== Bake Output ==="); - logMessage("Running bake..."); - - ProcessResult bakeResult = runProcess("java -cp bakefile.jar fr.monlouyan.bakefile.Main", bakeDir); - writer.println(bakeResult.output); - logMessage(bakeResult.output); - - // Compare results - logMessage("Comparing results..."); - writer.println("\n=== Comparison Results ==="); - - // Compare exit codes - boolean exitCodesMatch = makeResult.exitCode == bakeResult.exitCode; - writer.println("Exit codes match: " + exitCodesMatch); - writer.println("Make exit code: " + makeResult.exitCode); - writer.println("Bake exit code: " + bakeResult.exitCode); - - // Compare output patterns (ignoring the tool name differences) - boolean outputPatternsMatch = compareOutputPatterns(makeResult.output, bakeResult.output); - writer.println("Output patterns match: " + outputPatternsMatch); - - // Compare final file state - writer.println("\n=== Final File State Comparison ==="); - - Map<String, FileInfo> makeFinalFiles = scanDirectory(makeDir); - Map<String, FileInfo> bakeFinalFiles = scanDirectory(bakeDir); - - compareAndLogFiles(makeFinalFiles, bakeFinalFiles, writer); - - // Check if files were created or modified as expected - boolean fileChangesMatch = compareFileChanges(makeFiles, makeFinalFiles, bakeFiles, bakeFinalFiles); - writer.println("File changes match: " + fileChangesMatch); - - // Test summary - boolean testPassed = exitCodesMatch && outputPatternsMatch && fileChangesMatch; - writer.println("\n=== Test Result ==="); - writer.println(testPassed ? "PASSED" : "FAILED"); - - logMessage(testPassed ? "Test PASSED" : "Test FAILED"); - - return testPassed; - - } catch (IOException e) { - logMessage("Error running test: " + e.getMessage()); - return false; - } - } - - private boolean compareFileChanges( - Map<String, FileInfo> makeInitial, - Map<String, FileInfo> makeFinal, - Map<String, FileInfo> bakeInitial, - Map<String, FileInfo> bakeFinal) { - - // Check if the same files were created in both directories - Set<String> makeCreated = new HashSet<>(makeFinal.keySet()); - makeCreated.removeAll(makeInitial.keySet()); - - Set<String> bakeCreated = new HashSet<>(bakeFinal.keySet()); - bakeCreated.removeAll(bakeInitial.keySet()); - - if (!makeCreated.equals(bakeCreated)) { - logMessage("Different files created:\nMake: " + makeCreated + "\nBake: " + bakeCreated); - return false; - } - - // Check if the same files were modified - boolean filesMatch = true; - for (String file : makeInitial.keySet()) { - if (makeFinal.containsKey(file) && bakeInitial.containsKey(file) && bakeFinal.containsKey(file)) { - boolean makeModified = !makeInitial.get(file).equals(makeFinal.get(file)); - boolean bakeModified = !bakeInitial.get(file).equals(bakeFinal.get(file)); - - if (makeModified != bakeModified) { - logMessage("File modification mismatch for " + file + - "\nMake modified: " + makeModified + - "\nBake modified: " + bakeModified); - filesMatch = false; - } - } - } - - return filesMatch; - } - - private ProcessResult runProcess(String command, File directory) throws IOException { - ProcessBuilder processBuilder = new ProcessBuilder("/bin/sh", "-c", command); - processBuilder.directory(directory); - Process process = processBuilder.start(); - - // Capture stdout and stderr - StringBuilder output = new StringBuilder(); - try (BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream())); - BufferedReader stdError = new BufferedReader(new InputStreamReader(process.getErrorStream()))) { - - String line; - while ((line = stdInput.readLine()) != null) { - output.append(line).append("\n"); - } - - while ((line = stdError.readLine()) != null) { - output.append("ERROR: ").append(line).append("\n"); - } - } - - try { - process.waitFor(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - - return new ProcessResult(process.exitValue(), output.toString()); - } - - private Map<String, FileInfo> scanDirectory(File directory) throws IOException { - Map<String, FileInfo> files = new HashMap<>(); - - if (!directory.exists() || !directory.isDirectory()) { - return files; - } - - Files.walkFileTree(directory.toPath(), new SimpleFileVisitor<Path>() { - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { - String relativePath = directory.toPath().relativize(file).toString(); - - // Skip bakefile.jar to avoid differences - if (relativePath.equals("bakefile.jar")) { - return FileVisitResult.CONTINUE; - } - - FileInfo info = new FileInfo( - Files.isRegularFile(file), - attrs.size(), - attrs.lastModifiedTime().toMillis() - ); - - files.put(relativePath, info); - return FileVisitResult.CONTINUE; - } - }); - - return files; - } - - private void compareAndLogFiles(Map<String, FileInfo> makeFiles, - Map<String, FileInfo> bakeFiles, - PrintWriter writer) { - Set<String> allFiles = new HashSet<>(); - allFiles.addAll(makeFiles.keySet()); - allFiles.addAll(bakeFiles.keySet()); - - List<String> sortedFiles = new ArrayList<>(allFiles); - Collections.sort(sortedFiles); - - writer.println("File comparison:"); - for (String file : sortedFiles) { - FileInfo makeInfo = makeFiles.get(file); - FileInfo bakeInfo = bakeFiles.get(file); - - writer.print(file + ": "); - if (makeInfo == null) { - writer.println("Only in Bake"); - } else if (bakeInfo == null) { - writer.println("Only in Make"); - } else if (makeInfo.equals(bakeInfo)) { - writer.println("Identical"); - } else { - writer.println("Different"); - writer.println(" Make: " + makeInfo); - writer.println(" Bake: " + bakeInfo); - } - } - } - - private boolean compareOutputPatterns(String makeOutput, String bakeOutput) { - // Normalize output by replacing tool-specific words - String normalizedMake = makeOutput.replaceAll("\\bmake\\b", "TOOL") - .replaceAll("\\bMake\\b", "TOOL") - .replaceAll("ERROR: ", ""); - String normalizedBake = bakeOutput.replaceAll("\\bbake\\b", "TOOL") - .replaceAll("\\bBake\\b", "TOOL") - .replaceAll("ERROR: ", "");; - - // Compare line by line, ignoring exact timestamps or specific paths - String[] makeLines = normalizedMake.split("\n"); - String[] bakeLines = normalizedBake.split("\n"); - - // If line counts are very different, they're probably not matching - if (Math.abs(makeLines.length - bakeLines.length) > 2) { - logMessage("Output line count mismatch: Make=" + makeLines.length + - ", Bake=" + bakeLines.length); - return false; - } - - // Compare key patterns like error messages, file operations, etc. - Pattern errorPattern = Pattern.compile(".*Error.*|.*\\*\\*\\*.*|.*failed.*", - Pattern.CASE_INSENSITIVE); - Pattern commandPattern = Pattern.compile("^[a-z0-9_\\-]+ .*|^\\$.*"); - - List<String> makeErrors = extractMatches(makeLines, errorPattern); - List<String> bakeErrors = extractMatches(bakeLines, errorPattern); - - List<String> makeCommands = extractMatches(makeLines, commandPattern); - List<String> bakeCommands = extractMatches(bakeLines, commandPattern); - - // If error counts are different, that's a significant difference - if (makeErrors.size() != bakeErrors.size()) { - logMessage("Error count mismatch: Make=" + makeErrors.size() + - ", Bake=" + bakeErrors.size()); - return false; - } - - // If command counts are different, that's a significant difference - if (makeCommands.size() != bakeCommands.size()) { - logMessage("Command count mismatch: Make=" + makeCommands.size() + - ", Bake=" + bakeCommands.size()); - return false; - } - - return true; - } - - private List<String> extractMatches(String[] lines, Pattern pattern) { - return Arrays.stream(lines) - .filter(line -> pattern.matcher(line).matches()) - .collect(Collectors.toList()); - } - - private void logMessage(String message) { - SwingUtilities.invokeLater(() -> { - logArea.append(message + "\n"); - // Scroll to bottom - logArea.setCaretPosition(logArea.getDocument().getLength()); - }); - } - - private static class TestInfo { - int row; - String language; - String testName; - - TestInfo(int row, String language, String testName) { - this.row = row; - this.language = language; - this.testName = testName; - } - } - - private static class FileInfo { - boolean isFile; - long size; - long lastModified; - - FileInfo(boolean isFile, long size, long lastModified) { - this.isFile = isFile; - this.size = size; - this.lastModified = lastModified; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof FileInfo)) { - return false; - } - FileInfo other = (FileInfo) obj; - return isFile == other.isFile && size == other.size; - // We don't compare lastModified times directly - } - - @Override - public String toString() { - return "isFile=" + isFile + ", size=" + size + ", lastModified=" + - new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(lastModified)); - } - } - - private static class ProcessResult { - int exitCode; - String output; - - ProcessResult(int exitCode, String output) { - this.exitCode = exitCode; - this.output = output; - } - } - - public static void main(String[] args) { - SwingUtilities.invokeLater(() -> { - try { - // Set native look and feel - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e) { - e.printStackTrace(); - } - - BakeTestRunner runner = new BakeTestRunner(); - runner.setVisible(true); - }); - } -} \ No newline at end of file diff --git a/tests/C/bakefile.jar b/tests/C/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/bakefile.jar and /dev/null differ diff --git a/tests/C/test-01-from-nothing/bake/bakefile.jar b/tests/C/test-01-from-nothing/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-01-from-nothing/bake/bakefile.jar and /dev/null differ diff --git a/tests/C/test-01-from-nothing/bakefile.jar b/tests/C/test-01-from-nothing/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-01-from-nothing/bakefile.jar and /dev/null differ diff --git a/tests/C/test-01-from-nothing/make/bakefile.jar b/tests/C/test-01-from-nothing/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-01-from-nothing/make/bakefile.jar and /dev/null differ diff --git a/tests/C/test-02-already-exist/bake/bakefile.jar b/tests/C/test-02-already-exist/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-02-already-exist/bake/bakefile.jar and /dev/null differ diff --git a/tests/C/test-02-already-exist/bakefile.jar b/tests/C/test-02-already-exist/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-02-already-exist/bakefile.jar and /dev/null differ diff --git a/tests/C/test-02-already-exist/make/bakefile.jar b/tests/C/test-02-already-exist/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-02-already-exist/make/bakefile.jar and /dev/null differ diff --git a/tests/C/test-03-circular/bake/bakefile.jar b/tests/C/test-03-circular/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-03-circular/bake/bakefile.jar and /dev/null differ diff --git a/tests/C/test-03-circular/bakefile.jar b/tests/C/test-03-circular/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-03-circular/bakefile.jar and /dev/null differ diff --git a/tests/C/test-03-circular/make/bakefile.jar b/tests/C/test-03-circular/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-03-circular/make/bakefile.jar and /dev/null differ diff --git a/tests/C/test-04-edited/bake/bakefile.jar b/tests/C/test-04-edited/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-04-edited/bake/bakefile.jar and /dev/null differ diff --git a/tests/C/test-04-edited/bakefile.jar b/tests/C/test-04-edited/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-04-edited/bakefile.jar and /dev/null differ diff --git a/tests/C/test-04-edited/make/bakefile.jar b/tests/C/test-04-edited/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-04-edited/make/bakefile.jar and /dev/null differ diff --git a/tests/C/test-05-variables/bake/bakefile.jar b/tests/C/test-05-variables/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-05-variables/bake/bakefile.jar and /dev/null differ diff --git a/tests/C/test-05-variables/bakefile.jar b/tests/C/test-05-variables/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-05-variables/bakefile.jar and /dev/null differ diff --git a/tests/C/test-05-variables/make/bakefile.jar b/tests/C/test-05-variables/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-05-variables/make/bakefile.jar and /dev/null differ diff --git a/tests/C/test-06-variables-on-cascade/bake/bakefile.jar b/tests/C/test-06-variables-on-cascade/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-06-variables-on-cascade/bake/bakefile.jar and /dev/null differ diff --git a/tests/C/test-06-variables-on-cascade/bakefile.jar b/tests/C/test-06-variables-on-cascade/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-06-variables-on-cascade/bakefile.jar and /dev/null differ diff --git a/tests/C/test-06-variables-on-cascade/make/bakefile.jar b/tests/C/test-06-variables-on-cascade/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/C/test-06-variables-on-cascade/make/bakefile.jar and /dev/null differ diff --git a/tests/Java/bakefile.jar b/tests/Java/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/Java/bakefile.jar and /dev/null differ diff --git a/tests/Java/test-01-from-nothing/bake/Bakefile b/tests/Java/test-01-from-nothing/bake/Bakefile deleted file mode 100644 index 191d272..0000000 --- a/tests/Java/test-01-from-nothing/bake/Bakefile +++ /dev/null @@ -1,7 +0,0 @@ -all: test1 Devinette - -test1: test1.java - javac test1.java - -Devinette: Devinette.java - javac Devinette.java \ No newline at end of file diff --git a/tests/Java/test-01-from-nothing/bake/Devinette.java b/tests/Java/test-01-from-nothing/bake/Devinette.java deleted file mode 100644 index f504b8b..0000000 --- a/tests/Java/test-01-from-nothing/bake/Devinette.java +++ /dev/null @@ -1,36 +0,0 @@ -import java.util.Scanner; -import java.util.Random; - -public class Devinette { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - Random random = new Random(); - int nombreMystere = random.nextInt(100) + 1; // Nombre entre 1 et 100 - int essais = 5; - boolean gagne = false; - - System.out.println("Bienvenue dans le jeu de devinette !"); - System.out.println("Essayez de deviner le nombre mystère entre 1 et 100. Vous avez " + essais + " tentatives."); - - for (int i = 0; i < essais; i++) { - System.out.print("Entrez votre tentative : "); - int tentative = scanner.nextInt(); - - if (tentative == nombreMystere) { - System.out.println("Bravo ! Vous avez trouvé le nombre mystère."); - gagne = true; - break; - } else if (tentative < nombreMystere) { - System.out.println("Trop bas ! Essayez encore."); - } else { - System.out.println("Trop haut ! Essayez encore."); - } - } - - if (!gagne) { - System.out.println("Dommage ! Le nombre mystère était : " + nombreMystere); - } - - scanner.close(); - } -} diff --git a/tests/Java/test-01-from-nothing/bake/bakefile.jar b/tests/Java/test-01-from-nothing/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/Java/test-01-from-nothing/bake/bakefile.jar and /dev/null differ diff --git a/tests/Java/test-01-from-nothing/bake/test1.java b/tests/Java/test-01-from-nothing/bake/test1.java deleted file mode 100644 index eb247cd..0000000 --- a/tests/Java/test-01-from-nothing/bake/test1.java +++ /dev/null @@ -1,6 +0,0 @@ -public class test1 { - - public static void main(String[] args) { - System.out.println("Compilation à partir de rien !"); - } -} \ No newline at end of file diff --git a/tests/Java/test-01-from-nothing/bakefile.jar b/tests/Java/test-01-from-nothing/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/Java/test-01-from-nothing/bakefile.jar and /dev/null differ diff --git a/tests/Java/test-01-from-nothing/make/Devinette.java b/tests/Java/test-01-from-nothing/make/Devinette.java deleted file mode 100644 index f504b8b..0000000 --- a/tests/Java/test-01-from-nothing/make/Devinette.java +++ /dev/null @@ -1,36 +0,0 @@ -import java.util.Scanner; -import java.util.Random; - -public class Devinette { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - Random random = new Random(); - int nombreMystere = random.nextInt(100) + 1; // Nombre entre 1 et 100 - int essais = 5; - boolean gagne = false; - - System.out.println("Bienvenue dans le jeu de devinette !"); - System.out.println("Essayez de deviner le nombre mystère entre 1 et 100. Vous avez " + essais + " tentatives."); - - for (int i = 0; i < essais; i++) { - System.out.print("Entrez votre tentative : "); - int tentative = scanner.nextInt(); - - if (tentative == nombreMystere) { - System.out.println("Bravo ! Vous avez trouvé le nombre mystère."); - gagne = true; - break; - } else if (tentative < nombreMystere) { - System.out.println("Trop bas ! Essayez encore."); - } else { - System.out.println("Trop haut ! Essayez encore."); - } - } - - if (!gagne) { - System.out.println("Dommage ! Le nombre mystère était : " + nombreMystere); - } - - scanner.close(); - } -} diff --git a/tests/Java/test-01-from-nothing/make/Makefile b/tests/Java/test-01-from-nothing/make/Makefile deleted file mode 100644 index 191d272..0000000 --- a/tests/Java/test-01-from-nothing/make/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all: test1 Devinette - -test1: test1.java - javac test1.java - -Devinette: Devinette.java - javac Devinette.java \ No newline at end of file diff --git a/tests/Java/test-01-from-nothing/make/bakefile.jar b/tests/Java/test-01-from-nothing/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/Java/test-01-from-nothing/make/bakefile.jar and /dev/null differ diff --git a/tests/Java/test-01-from-nothing/make/test1.java b/tests/Java/test-01-from-nothing/make/test1.java deleted file mode 100644 index eb247cd..0000000 --- a/tests/Java/test-01-from-nothing/make/test1.java +++ /dev/null @@ -1,6 +0,0 @@ -public class test1 { - - public static void main(String[] args) { - System.out.println("Compilation à partir de rien !"); - } -} \ No newline at end of file diff --git a/tests/Java/test-02-already-exist/README.md b/tests/Java/test-02-already-exist/README.md deleted file mode 100644 index f478192..0000000 --- a/tests/Java/test-02-already-exist/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Test 2 : Compilation où le résultat existe déjà - -## Description -Ce test vérifie que si l'exécutable `Main.class` est déjà présent et que `Main.java` -n'a pas été modifié, alors `Bake` ne tente pas de recompiler. - -## Fichiers utilisés -- `Main.java` : Fichier source inchangé. -- `Bakefile` : Contient les règles de compilation. -- `Main.class` : Fichier compilé déjà généré. - -## Étapes du test - -1. **Première compilation** - - Exécuter `bake` pour compiler le programme. - - Vérifier que `Main.class` est bien créé. - -2. **Vérification de l'absence de recompilation** - - Exécuter `bake` une seconde fois **sans modifier** `Main.java`. - - Aucun message indiquant la recompilation ne doit apparaître. - -3. **Modification du fichier source** - - Modifier `Main.java` en ajoutant une ligne de code. - - Exécuter `bake` à nouveau. - - Cette fois, `bake` doit détecter la modification et recompiler `Main.java`. - -## Résultat attendu -- Si `Main.class` existe et que `Main.java` n'a pas été modifié, **`Bake` ne doit pas recompiler.** -- Si `Main.java` est modifié, `Bake` doit **uniquement** recompiler ce fichier. - -✅ **Si `bake` évite de recompiler sans raison et ne recompile que lorsque c’est nécessaire, alors le test est réussi !** 🚀 diff --git a/tests/Java/test-02-already-exist/bake/Bakefile b/tests/Java/test-02-already-exist/bake/Bakefile deleted file mode 100644 index 9c6e5ca..0000000 --- a/tests/Java/test-02-already-exist/bake/Bakefile +++ /dev/null @@ -1,6 +0,0 @@ -# Bakefile - -Main.class: Main.java - javac Main.java - -all: Main.class diff --git a/tests/Java/test-02-already-exist/bake/Main.java b/tests/Java/test-02-already-exist/bake/Main.java deleted file mode 100644 index b0d38a2..0000000 --- a/tests/Java/test-02-already-exist/bake/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - public static void main(String[] args) { - System.out.println("Ceci est un programme de test du Bakefile !"); - System.out.println("test"); - } -} diff --git a/tests/Java/test-02-already-exist/make/Main.java b/tests/Java/test-02-already-exist/make/Main.java deleted file mode 100644 index b0d38a2..0000000 --- a/tests/Java/test-02-already-exist/make/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - public static void main(String[] args) { - System.out.println("Ceci est un programme de test du Bakefile !"); - System.out.println("test"); - } -} diff --git a/tests/Java/test-02-already-exist/make/Makefile b/tests/Java/test-02-already-exist/make/Makefile deleted file mode 100644 index 32d72da..0000000 --- a/tests/Java/test-02-already-exist/make/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# Makefile - -Main.class: Main.java - javac Main.java - -all: Main.class diff --git a/tests/Java/test-03-circular/bake/Bakefile b/tests/Java/test-03-circular/bake/Bakefile deleted file mode 100644 index 4544088..0000000 --- a/tests/Java/test-03-circular/bake/Bakefile +++ /dev/null @@ -1,11 +0,0 @@ -main: ClasseA ClasseB ClasseC Main.java - javac Main.java - -ClasseA: ClasseB - javac ClasseA.java - -ClasseB: ClasseA - javac ClasseB.java - -ClasseC: ClasseB ClasseA - javac ClasseC.java \ No newline at end of file diff --git a/tests/Java/test-03-circular/bake/ClasseA.java b/tests/Java/test-03-circular/bake/ClasseA.java deleted file mode 100644 index 7d10704..0000000 --- a/tests/Java/test-03-circular/bake/ClasseA.java +++ /dev/null @@ -1,7 +0,0 @@ -public class ClasseA { - private ClasseB b; - - public ClasseA(ClasseB b) { - this.b = b; - } -} diff --git a/tests/Java/test-03-circular/bake/ClasseB.java b/tests/Java/test-03-circular/bake/ClasseB.java deleted file mode 100644 index 67fd6ac..0000000 --- a/tests/Java/test-03-circular/bake/ClasseB.java +++ /dev/null @@ -1,7 +0,0 @@ -public class ClasseB { - private ClasseA a; - - public ClasseB(ClasseA a) { - this.a = a; - } -} diff --git a/tests/Java/test-03-circular/bake/ClasseC.java b/tests/Java/test-03-circular/bake/ClasseC.java deleted file mode 100644 index 4f9f759..0000000 --- a/tests/Java/test-03-circular/bake/ClasseC.java +++ /dev/null @@ -1,9 +0,0 @@ -public class ClasseC { - private ClasseA a; - private ClasseB b; - - public ClasseC(ClasseA a, ClasseB b) { - this.a = a; - this.b = b; - } -} diff --git a/tests/Java/test-03-circular/bake/Main.java b/tests/Java/test-03-circular/bake/Main.java deleted file mode 100644 index c8c8ab7..0000000 --- a/tests/Java/test-03-circular/bake/Main.java +++ /dev/null @@ -1,16 +0,0 @@ -public class Main { - private ClasseA a; - private ClasseB b; - private ClasseC c; - - public Main() { - this.a = new ClasseA(b); - this.b = new ClasseB(a); - this.c = new ClasseC(a,b); - } - - public static void main(String[] args) { - Main m = new Main(); - System.out.println("Ceci est un test de dépendences circulaires"); - } -} diff --git a/tests/Java/test-03-circular/bake/bakefile.jar b/tests/Java/test-03-circular/bake/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/Java/test-03-circular/bake/bakefile.jar and /dev/null differ diff --git a/tests/Java/test-03-circular/bakefile.jar b/tests/Java/test-03-circular/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/Java/test-03-circular/bakefile.jar and /dev/null differ diff --git a/tests/Java/test-03-circular/make/ClasseA.java b/tests/Java/test-03-circular/make/ClasseA.java deleted file mode 100644 index 7d10704..0000000 --- a/tests/Java/test-03-circular/make/ClasseA.java +++ /dev/null @@ -1,7 +0,0 @@ -public class ClasseA { - private ClasseB b; - - public ClasseA(ClasseB b) { - this.b = b; - } -} diff --git a/tests/Java/test-03-circular/make/ClasseB.java b/tests/Java/test-03-circular/make/ClasseB.java deleted file mode 100644 index 67fd6ac..0000000 --- a/tests/Java/test-03-circular/make/ClasseB.java +++ /dev/null @@ -1,7 +0,0 @@ -public class ClasseB { - private ClasseA a; - - public ClasseB(ClasseA a) { - this.a = a; - } -} diff --git a/tests/Java/test-03-circular/make/ClasseC.java b/tests/Java/test-03-circular/make/ClasseC.java deleted file mode 100644 index 4f9f759..0000000 --- a/tests/Java/test-03-circular/make/ClasseC.java +++ /dev/null @@ -1,9 +0,0 @@ -public class ClasseC { - private ClasseA a; - private ClasseB b; - - public ClasseC(ClasseA a, ClasseB b) { - this.a = a; - this.b = b; - } -} diff --git a/tests/Java/test-03-circular/make/Main.java b/tests/Java/test-03-circular/make/Main.java deleted file mode 100644 index c8c8ab7..0000000 --- a/tests/Java/test-03-circular/make/Main.java +++ /dev/null @@ -1,16 +0,0 @@ -public class Main { - private ClasseA a; - private ClasseB b; - private ClasseC c; - - public Main() { - this.a = new ClasseA(b); - this.b = new ClasseB(a); - this.c = new ClasseC(a,b); - } - - public static void main(String[] args) { - Main m = new Main(); - System.out.println("Ceci est un test de dépendences circulaires"); - } -} diff --git a/tests/Java/test-03-circular/make/Makefile b/tests/Java/test-03-circular/make/Makefile deleted file mode 100644 index 4544088..0000000 --- a/tests/Java/test-03-circular/make/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -main: ClasseA ClasseB ClasseC Main.java - javac Main.java - -ClasseA: ClasseB - javac ClasseA.java - -ClasseB: ClasseA - javac ClasseB.java - -ClasseC: ClasseB ClasseA - javac ClasseC.java \ No newline at end of file diff --git a/tests/Java/test-03-circular/make/bakefile.jar b/tests/Java/test-03-circular/make/bakefile.jar deleted file mode 100644 index 875b1b3..0000000 Binary files a/tests/Java/test-03-circular/make/bakefile.jar and /dev/null differ diff --git a/tests/Java/test-04-edited/README.md b/tests/Java/test-04-edited/README.md deleted file mode 100644 index 651ce4f..0000000 --- a/tests/Java/test-04-edited/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# Test 4 : Compilation où le résultat existe déjà OU est modifier - -## 📌 Description -Ce test vérifie que si l’exécutable `Main.class` est déjà présent et que `Main.java` -n'a pas été modifié, alors `bake` ne doit **pas recompiler** inutilement. - -Cela permet d’optimiser la compilation en évitant de perdre du temps et des ressources -à recompiler des fichiers inchangés, comme `make` en C. - ---- - -## 📂 **Fichiers utilisés** -- **`Main.java`** : Fichier source contenant le programme principal. -- **`Bakefile`** : Contient les règles de compilation. -- **`Main.class`** : Fichier compilé qui doit exister avant le test. - ---- - -## ✅ **Résultat attendu** -1️⃣ **Première exécution de `bake`** - - Si `Main.class` **n’existe pas**, `bake` doit **compiler** `Main.java`. - - **Commande exécutée :** - ```sh - javac Main.java - ``` - - `Main.class` est généré. - -2️⃣ **Seconde exécution de `bake` sans modification** - - Si `Main.class` est **déjà à jour**, `bake` **ne doit rien faire**. - - **Aucune commande `javac` ne doit être exécutée**. - -3️⃣ **Modification de `Main.java` et recompilation** - - Si `Main.java` est **modifié**, `bake` doit **détecter le changement** et - recompiler uniquement `Main.java`. - - **Commande exécutée :** - ```sh - javac Main.java - ``` - ---- - -## 🔬 **Procédure de test** -### **1️⃣ Étape 1 : Compilation initiale** -1. Supprimer `Main.class` s’il existe déjà : - ```sh - rm -f Main.class - ``` -2. Exécuter `bake` : - ```sh - java -cp bakefile.jar fr.monlouyan.bakefile.Main -javac Main.java - ``` -3. **Attendu** : - - `bake` doit exécuter `javac Main.java` et créer `Main.class`. - -### **2️⃣ Étape 2 : Vérification sans modification** -1. Exécuter `bake` une seconde fois : - ```sh - java -cp bakefile.jar fr.monlouyan.bakefile.Main -javac Main.java - ``` -2. **Attendu** : - - **Aucune recompilation** ne doit avoir lieu. - - `bake` **ne doit afficher aucun message de compilation**. - -### **3️⃣ Étape 3 : Modifier `Main.java`** -1. Modifier `Main.java`, par exemple en ajoutant une ligne : - ```java - System.out.println("Nouvelle ligne ajoutée !"); - ``` -2. Exécuter `bake` : - ```sh - java -cp bakefile.jar fr.monlouyan.bakefile.Main -javac Main.java - ``` -3. **Attendu** : - - `bake` détecte la modification et exécute `javac Main.java`. - - `Main.class` est mis à jour. - ---- - -## 🛠 **Fichier `Bakefile` utilisé** -```make -# Bakefile - -Main.class: Main.java - javac Main.java - -all: Main.class -``` -➡ Ce `Bakefile` garantit que `bake` **ne recompile `Main.java` que si nécessaire**. - ---- - -## 🎯 **Validation du test** -| Situation | Comportement attendu | -|-----------|----------------------| -| **Première compilation (`bake`)** | `javac Main.java` est exécuté ✅ | -| **Seconde exécution sans modification (`bake`)** | **Aucune recompilation** ✅ | -| **Modification de `Main.java`** | `javac Main.java` est exécuté à nouveau ✅ | - ---- - -## 📌 **Conclusion** -- Si `bake` **ne recompile pas sans raison** et ne recompile `Main.java` **que si modifié**, alors **le test est réussi !** ✅ -- Cela assure une **optimisation de la compilation** et empêche le gaspillage de ressources. - -🚀 **Lance le test et vérifie que `bake` fonctionne correctement !** diff --git a/tests/Java/test-04-edited/bake/Bakefile b/tests/Java/test-04-edited/bake/Bakefile deleted file mode 100644 index 17f67d2..0000000 --- a/tests/Java/test-04-edited/bake/Bakefile +++ /dev/null @@ -1,4 +0,0 @@ -Main.class: Main.java - javac Main.java - -all: Main.class diff --git a/tests/Java/test-04-edited/bake/Main.java b/tests/Java/test-04-edited/bake/Main.java deleted file mode 100644 index 8153ee1..0000000 --- a/tests/Java/test-04-edited/bake/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - public static void main(String[] args) { - System.out.println("Ceci est un programme de test du Bakefile !"); - System.out.println("On essaye de voir si le programme recompile après une modification...."); - } -} diff --git a/tests/Java/test-04-edited/make/Main.java b/tests/Java/test-04-edited/make/Main.java deleted file mode 100644 index 8153ee1..0000000 --- a/tests/Java/test-04-edited/make/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - public static void main(String[] args) { - System.out.println("Ceci est un programme de test du Bakefile !"); - System.out.println("On essaye de voir si le programme recompile après une modification...."); - } -} diff --git a/tests/Java/test-04-edited/make/Makefile b/tests/Java/test-04-edited/make/Makefile deleted file mode 100644 index 17f67d2..0000000 --- a/tests/Java/test-04-edited/make/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -Main.class: Main.java - javac Main.java - -all: Main.class diff --git a/tests/Java/test-05-variables/bake/Bakefile b/tests/Java/test-05-variables/bake/Bakefile deleted file mode 100644 index f1b6b55..0000000 --- a/tests/Java/test-05-variables/bake/Bakefile +++ /dev/null @@ -1,11 +0,0 @@ -# Définition des variables -COMPILATEUR = javac -OPTIONS = -d . -EXECUTABLE = Main.class -SOURCE = Main.java - -# Règle principale -$(EXECUTABLE): $(SOURCE) - $(COMPILATEUR) $(OPTIONS) $(SOURCE) - -all: $(EXECUTABLE) diff --git a/tests/Java/test-05-variables/bake/Main.java b/tests/Java/test-05-variables/bake/Main.java deleted file mode 100644 index f480ecc..0000000 --- a/tests/Java/test-05-variables/bake/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - - public static void main(String[] args) { - System.out.println("Ceci est un programme de test du Bakefile !"); - } -} \ No newline at end of file diff --git a/tests/Java/test-05-variables/make/Main.java b/tests/Java/test-05-variables/make/Main.java deleted file mode 100644 index f480ecc..0000000 --- a/tests/Java/test-05-variables/make/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - - public static void main(String[] args) { - System.out.println("Ceci est un programme de test du Bakefile !"); - } -} \ No newline at end of file diff --git a/tests/Java/test-05-variables/make/Makefile b/tests/Java/test-05-variables/make/Makefile deleted file mode 100644 index f1b6b55..0000000 --- a/tests/Java/test-05-variables/make/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# Définition des variables -COMPILATEUR = javac -OPTIONS = -d . -EXECUTABLE = Main.class -SOURCE = Main.java - -# Règle principale -$(EXECUTABLE): $(SOURCE) - $(COMPILATEUR) $(OPTIONS) $(SOURCE) - -all: $(EXECUTABLE) diff --git a/tests/C/test-01-from-nothing/README.md b/tests/test-01-from-nothing/README.md similarity index 100% rename from tests/C/test-01-from-nothing/README.md rename to tests/test-01-from-nothing/README.md diff --git a/tests/C/test-01-from-nothing/bake/Bakefile b/tests/test-01-from-nothing/bake/Bakefile similarity index 100% rename from tests/C/test-01-from-nothing/bake/Bakefile rename to tests/test-01-from-nothing/bake/Bakefile diff --git a/tests/C/test-01-from-nothing/bake/main.c b/tests/test-01-from-nothing/bake/main.c similarity index 100% rename from tests/C/test-01-from-nothing/bake/main.c rename to tests/test-01-from-nothing/bake/main.c diff --git a/tests/C/test-01-from-nothing/make/Makefile b/tests/test-01-from-nothing/make/Makefile similarity index 100% rename from tests/C/test-01-from-nothing/make/Makefile rename to tests/test-01-from-nothing/make/Makefile diff --git a/tests/C/test-01-from-nothing/make/main.c b/tests/test-01-from-nothing/make/main.c similarity index 100% rename from tests/C/test-01-from-nothing/make/main.c rename to tests/test-01-from-nothing/make/main.c diff --git a/tests/C/test-01-from-nothing/run_test01.sh b/tests/test-01-from-nothing/run_test01.sh similarity index 100% rename from tests/C/test-01-from-nothing/run_test01.sh rename to tests/test-01-from-nothing/run_test01.sh diff --git a/tests/C/test-02-already-exist/README.md b/tests/test-02-already-exist/README.md similarity index 100% rename from tests/C/test-02-already-exist/README.md rename to tests/test-02-already-exist/README.md diff --git a/tests/C/test-02-already-exist/bake/Bakefile b/tests/test-02-already-exist/bake/Bakefile similarity index 100% rename from tests/C/test-02-already-exist/bake/Bakefile rename to tests/test-02-already-exist/bake/Bakefile diff --git a/tests/C/test-02-already-exist/bake/main b/tests/test-02-already-exist/bake/main similarity index 100% rename from tests/C/test-02-already-exist/bake/main rename to tests/test-02-already-exist/bake/main diff --git a/tests/C/test-02-already-exist/bake/main.c b/tests/test-02-already-exist/bake/main.c similarity index 100% rename from tests/C/test-02-already-exist/bake/main.c rename to tests/test-02-already-exist/bake/main.c diff --git a/tests/C/test-02-already-exist/make/Makefile b/tests/test-02-already-exist/make/Makefile similarity index 100% rename from tests/C/test-02-already-exist/make/Makefile rename to tests/test-02-already-exist/make/Makefile diff --git a/tests/C/test-02-already-exist/make/main b/tests/test-02-already-exist/make/main similarity index 100% rename from tests/C/test-02-already-exist/make/main rename to tests/test-02-already-exist/make/main diff --git a/tests/C/test-02-already-exist/make/main.c b/tests/test-02-already-exist/make/main.c similarity index 100% rename from tests/C/test-02-already-exist/make/main.c rename to tests/test-02-already-exist/make/main.c diff --git a/tests/C/test-02-already-exist/run_test02.sh b/tests/test-02-already-exist/run_test02.sh similarity index 100% rename from tests/C/test-02-already-exist/run_test02.sh rename to tests/test-02-already-exist/run_test02.sh diff --git a/tests/C/test-03-circular/README.md b/tests/test-03-circular/README.md similarity index 100% rename from tests/C/test-03-circular/README.md rename to tests/test-03-circular/README.md diff --git a/tests/C/test-03-circular/bake/Bakefile b/tests/test-03-circular/bake/Bakefile similarity index 100% rename from tests/C/test-03-circular/bake/Bakefile rename to tests/test-03-circular/bake/Bakefile diff --git a/tests/C/test-03-circular/bake/README.md b/tests/test-03-circular/bake/README.md similarity index 100% rename from tests/C/test-03-circular/bake/README.md rename to tests/test-03-circular/bake/README.md diff --git a/tests/C/test-03-circular/bake/a.c b/tests/test-03-circular/bake/a.c similarity index 100% rename from tests/C/test-03-circular/bake/a.c rename to tests/test-03-circular/bake/a.c diff --git a/tests/C/test-03-circular/bake/a.h b/tests/test-03-circular/bake/a.h similarity index 100% rename from tests/C/test-03-circular/bake/a.h rename to tests/test-03-circular/bake/a.h diff --git a/tests/C/test-03-circular/bake/b.c b/tests/test-03-circular/bake/b.c similarity index 100% rename from tests/C/test-03-circular/bake/b.c rename to tests/test-03-circular/bake/b.c diff --git a/tests/C/test-03-circular/bake/b.h b/tests/test-03-circular/bake/b.h similarity index 100% rename from tests/C/test-03-circular/bake/b.h rename to tests/test-03-circular/bake/b.h diff --git a/tests/C/test-03-circular/bake/c.c b/tests/test-03-circular/bake/c.c similarity index 100% rename from tests/C/test-03-circular/bake/c.c rename to tests/test-03-circular/bake/c.c diff --git a/tests/C/test-03-circular/bake/c.h b/tests/test-03-circular/bake/c.h similarity index 100% rename from tests/C/test-03-circular/bake/c.h rename to tests/test-03-circular/bake/c.h diff --git a/tests/C/test-03-circular/make/Makefile b/tests/test-03-circular/make/Makefile similarity index 100% rename from tests/C/test-03-circular/make/Makefile rename to tests/test-03-circular/make/Makefile diff --git a/tests/C/test-03-circular/make/README.md b/tests/test-03-circular/make/README.md similarity index 100% rename from tests/C/test-03-circular/make/README.md rename to tests/test-03-circular/make/README.md diff --git a/tests/C/test-03-circular/make/a.c b/tests/test-03-circular/make/a.c similarity index 100% rename from tests/C/test-03-circular/make/a.c rename to tests/test-03-circular/make/a.c diff --git a/tests/C/test-03-circular/make/a.h b/tests/test-03-circular/make/a.h similarity index 100% rename from tests/C/test-03-circular/make/a.h rename to tests/test-03-circular/make/a.h diff --git a/tests/C/test-03-circular/make/b.c b/tests/test-03-circular/make/b.c similarity index 100% rename from tests/C/test-03-circular/make/b.c rename to tests/test-03-circular/make/b.c diff --git a/tests/C/test-03-circular/make/b.h b/tests/test-03-circular/make/b.h similarity index 100% rename from tests/C/test-03-circular/make/b.h rename to tests/test-03-circular/make/b.h diff --git a/tests/C/test-03-circular/make/c.c b/tests/test-03-circular/make/c.c similarity index 100% rename from tests/C/test-03-circular/make/c.c rename to tests/test-03-circular/make/c.c diff --git a/tests/C/test-03-circular/make/c.h b/tests/test-03-circular/make/c.h similarity index 100% rename from tests/C/test-03-circular/make/c.h rename to tests/test-03-circular/make/c.h diff --git a/tests/C/test-03-circular/run_test03.sh b/tests/test-03-circular/run_test03.sh similarity index 100% rename from tests/C/test-03-circular/run_test03.sh rename to tests/test-03-circular/run_test03.sh diff --git a/tests/C/test-04-edited/README.md b/tests/test-04-edited/README.md similarity index 100% rename from tests/C/test-04-edited/README.md rename to tests/test-04-edited/README.md diff --git a/tests/C/test-04-edited/bake/Bakefile b/tests/test-04-edited/bake/Bakefile similarity index 100% rename from tests/C/test-04-edited/bake/Bakefile rename to tests/test-04-edited/bake/Bakefile diff --git a/tests/C/test-04-edited/bake/main b/tests/test-04-edited/bake/main similarity index 100% rename from tests/C/test-04-edited/bake/main rename to tests/test-04-edited/bake/main diff --git a/tests/C/test-04-edited/bake/main.c b/tests/test-04-edited/bake/main.c similarity index 100% rename from tests/C/test-04-edited/bake/main.c rename to tests/test-04-edited/bake/main.c diff --git a/tests/C/test-04-edited/make/Makefile b/tests/test-04-edited/make/Makefile similarity index 100% rename from tests/C/test-04-edited/make/Makefile rename to tests/test-04-edited/make/Makefile diff --git a/tests/C/test-04-edited/make/main b/tests/test-04-edited/make/main similarity index 100% rename from tests/C/test-04-edited/make/main rename to tests/test-04-edited/make/main diff --git a/tests/C/test-04-edited/make/main.c b/tests/test-04-edited/make/main.c similarity index 100% rename from tests/C/test-04-edited/make/main.c rename to tests/test-04-edited/make/main.c diff --git a/tests/C/test-04-edited/run_test04.sh b/tests/test-04-edited/run_test04.sh similarity index 100% rename from tests/C/test-04-edited/run_test04.sh rename to tests/test-04-edited/run_test04.sh diff --git a/tests/C/test-05-variables/README.md b/tests/test-05-variables/README.md similarity index 100% rename from tests/C/test-05-variables/README.md rename to tests/test-05-variables/README.md diff --git a/tests/C/test-05-variables/bake/Bakefile b/tests/test-05-variables/bake/Bakefile similarity index 100% rename from tests/C/test-05-variables/bake/Bakefile rename to tests/test-05-variables/bake/Bakefile diff --git a/tests/C/test-05-variables/bake/main.c b/tests/test-05-variables/bake/main.c similarity index 100% rename from tests/C/test-05-variables/bake/main.c rename to tests/test-05-variables/bake/main.c diff --git a/tests/C/test-05-variables/make/Makefile b/tests/test-05-variables/make/Makefile similarity index 100% rename from tests/C/test-05-variables/make/Makefile rename to tests/test-05-variables/make/Makefile diff --git a/tests/C/test-05-variables/make/main.c b/tests/test-05-variables/make/main.c similarity index 100% rename from tests/C/test-05-variables/make/main.c rename to tests/test-05-variables/make/main.c diff --git a/tests/C/test-05-variables/run_test05.sh b/tests/test-05-variables/run_test05.sh similarity index 100% rename from tests/C/test-05-variables/run_test05.sh rename to tests/test-05-variables/run_test05.sh diff --git a/tests/C/test-06-variables-on-cascade/README.md b/tests/test-06-variables-on-cascade/README.md similarity index 100% rename from tests/C/test-06-variables-on-cascade/README.md rename to tests/test-06-variables-on-cascade/README.md diff --git a/tests/C/test-06-variables-on-cascade/bake/Bakefile b/tests/test-06-variables-on-cascade/bake/Bakefile similarity index 100% rename from tests/C/test-06-variables-on-cascade/bake/Bakefile rename to tests/test-06-variables-on-cascade/bake/Bakefile diff --git a/tests/C/test-06-variables-on-cascade/bake/main.c b/tests/test-06-variables-on-cascade/bake/main.c similarity index 100% rename from tests/C/test-06-variables-on-cascade/bake/main.c rename to tests/test-06-variables-on-cascade/bake/main.c diff --git a/tests/C/test-06-variables-on-cascade/make/Makefile b/tests/test-06-variables-on-cascade/make/Makefile similarity index 100% rename from tests/C/test-06-variables-on-cascade/make/Makefile rename to tests/test-06-variables-on-cascade/make/Makefile diff --git a/tests/C/test-06-variables-on-cascade/make/main.c b/tests/test-06-variables-on-cascade/make/main.c similarity index 100% rename from tests/C/test-06-variables-on-cascade/make/main.c rename to tests/test-06-variables-on-cascade/make/main.c diff --git a/tests/C/test-07-dependency/README.md b/tests/test-07-dependency/README.md similarity index 100% rename from tests/C/test-07-dependency/README.md rename to tests/test-07-dependency/README.md diff --git a/tests/C/test-07-dependency/bake/Bakefile b/tests/test-07-dependency/bake/Bakefile similarity index 100% rename from tests/C/test-07-dependency/bake/Bakefile rename to tests/test-07-dependency/bake/Bakefile diff --git a/tests/C/test-07-dependency/bake/main.c b/tests/test-07-dependency/bake/main.c similarity index 100% rename from tests/C/test-07-dependency/bake/main.c rename to tests/test-07-dependency/bake/main.c diff --git a/tests/C/test-07-dependency/bake/module.c b/tests/test-07-dependency/bake/module.c similarity index 100% rename from tests/C/test-07-dependency/bake/module.c rename to tests/test-07-dependency/bake/module.c diff --git a/tests/C/test-07-dependency/bake/module.h b/tests/test-07-dependency/bake/module.h similarity index 100% rename from tests/C/test-07-dependency/bake/module.h rename to tests/test-07-dependency/bake/module.h diff --git a/tests/C/test-07-dependency/make/Makefile b/tests/test-07-dependency/make/Makefile similarity index 100% rename from tests/C/test-07-dependency/make/Makefile rename to tests/test-07-dependency/make/Makefile diff --git a/tests/C/test-07-dependency/make/main.c b/tests/test-07-dependency/make/main.c similarity index 100% rename from tests/C/test-07-dependency/make/main.c rename to tests/test-07-dependency/make/main.c diff --git a/tests/C/test-07-dependency/make/module.c b/tests/test-07-dependency/make/module.c similarity index 100% rename from tests/C/test-07-dependency/make/module.c rename to tests/test-07-dependency/make/module.c diff --git a/tests/C/test-07-dependency/make/module.h b/tests/test-07-dependency/make/module.h similarity index 100% rename from tests/C/test-07-dependency/make/module.h rename to tests/test-07-dependency/make/module.h diff --git a/tests/C/test-08-space-vs-tabulation/README.md b/tests/test-08-space-vs-tabulation/README.md similarity index 100% rename from tests/C/test-08-space-vs-tabulation/README.md rename to tests/test-08-space-vs-tabulation/README.md diff --git a/tests/C/test-08-space-vs-tabulation/bake/Bakefile b/tests/test-08-space-vs-tabulation/bake/Bakefile similarity index 100% rename from tests/C/test-08-space-vs-tabulation/bake/Bakefile rename to tests/test-08-space-vs-tabulation/bake/Bakefile diff --git a/tests/C/test-08-space-vs-tabulation/make/Makefile b/tests/test-08-space-vs-tabulation/make/Makefile similarity index 100% rename from tests/C/test-08-space-vs-tabulation/make/Makefile rename to tests/test-08-space-vs-tabulation/make/Makefile diff --git a/tests/C/test-09-handling-comment/README.md b/tests/test-09-handling-comment/README.md similarity index 100% rename from tests/C/test-09-handling-comment/README.md rename to tests/test-09-handling-comment/README.md diff --git a/tests/C/test-09-handling-comment/bake/Bakefile b/tests/test-09-handling-comment/bake/Bakefile similarity index 100% rename from tests/C/test-09-handling-comment/bake/Bakefile rename to tests/test-09-handling-comment/bake/Bakefile diff --git a/tests/C/test-09-handling-comment/bake/main.c b/tests/test-09-handling-comment/bake/main.c similarity index 100% rename from tests/C/test-09-handling-comment/bake/main.c rename to tests/test-09-handling-comment/bake/main.c diff --git a/tests/C/test-09-handling-comment/bake/module.c b/tests/test-09-handling-comment/bake/module.c similarity index 100% rename from tests/C/test-09-handling-comment/bake/module.c rename to tests/test-09-handling-comment/bake/module.c diff --git a/tests/C/test-09-handling-comment/bake/module.h b/tests/test-09-handling-comment/bake/module.h similarity index 100% rename from tests/C/test-09-handling-comment/bake/module.h rename to tests/test-09-handling-comment/bake/module.h diff --git a/tests/C/test-09-handling-comment/make/Makefile b/tests/test-09-handling-comment/make/Makefile similarity index 100% rename from tests/C/test-09-handling-comment/make/Makefile rename to tests/test-09-handling-comment/make/Makefile diff --git a/tests/C/test-09-handling-comment/make/main.c b/tests/test-09-handling-comment/make/main.c similarity index 100% rename from tests/C/test-09-handling-comment/make/main.c rename to tests/test-09-handling-comment/make/main.c diff --git a/tests/C/test-09-handling-comment/make/module.c b/tests/test-09-handling-comment/make/module.c similarity index 100% rename from tests/C/test-09-handling-comment/make/module.c rename to tests/test-09-handling-comment/make/module.c diff --git a/tests/C/test-09-handling-comment/make/module.h b/tests/test-09-handling-comment/make/module.h similarity index 100% rename from tests/C/test-09-handling-comment/make/module.h rename to tests/test-09-handling-comment/make/module.h diff --git a/tests/C/test-10-phony/README.md b/tests/test-10-phony/README.md similarity index 100% rename from tests/C/test-10-phony/README.md rename to tests/test-10-phony/README.md diff --git a/tests/C/test-10-phony/bake/Bakefile b/tests/test-10-phony/bake/Bakefile similarity index 100% rename from tests/C/test-10-phony/bake/Bakefile rename to tests/test-10-phony/bake/Bakefile diff --git a/tests/C/test-10-phony/bake/clean b/tests/test-10-phony/bake/clean similarity index 100% rename from tests/C/test-10-phony/bake/clean rename to tests/test-10-phony/bake/clean diff --git a/tests/C/test-10-phony/bake/main.c b/tests/test-10-phony/bake/main.c similarity index 100% rename from tests/C/test-10-phony/bake/main.c rename to tests/test-10-phony/bake/main.c diff --git a/tests/C/test-10-phony/bake/module.c b/tests/test-10-phony/bake/module.c similarity index 100% rename from tests/C/test-10-phony/bake/module.c rename to tests/test-10-phony/bake/module.c diff --git a/tests/C/test-10-phony/bake/module.h b/tests/test-10-phony/bake/module.h similarity index 100% rename from tests/C/test-10-phony/bake/module.h rename to tests/test-10-phony/bake/module.h diff --git a/tests/C/test-10-phony/make/Makefile b/tests/test-10-phony/make/Makefile similarity index 100% rename from tests/C/test-10-phony/make/Makefile rename to tests/test-10-phony/make/Makefile diff --git a/tests/C/test-10-phony/make/clean b/tests/test-10-phony/make/clean similarity index 100% rename from tests/C/test-10-phony/make/clean rename to tests/test-10-phony/make/clean diff --git a/tests/C/test-10-phony/make/main.c b/tests/test-10-phony/make/main.c similarity index 100% rename from tests/C/test-10-phony/make/main.c rename to tests/test-10-phony/make/main.c diff --git a/tests/C/test-10-phony/make/module.c b/tests/test-10-phony/make/module.c similarity index 100% rename from tests/C/test-10-phony/make/module.c rename to tests/test-10-phony/make/module.c diff --git a/tests/C/test-10-phony/make/module.h b/tests/test-10-phony/make/module.h similarity index 100% rename from tests/C/test-10-phony/make/module.h rename to tests/test-10-phony/make/module.h diff --git a/tests/C/test-11-error-in-code/README.md b/tests/test-11-error-in-code/README.md similarity index 100% rename from tests/C/test-11-error-in-code/README.md rename to tests/test-11-error-in-code/README.md diff --git a/tests/C/test-11-error-in-code/bake/Bakefile b/tests/test-11-error-in-code/bake/Bakefile similarity index 100% rename from tests/C/test-11-error-in-code/bake/Bakefile rename to tests/test-11-error-in-code/bake/Bakefile diff --git a/tests/C/test-11-error-in-code/bake/main.c b/tests/test-11-error-in-code/bake/main.c similarity index 100% rename from tests/C/test-11-error-in-code/bake/main.c rename to tests/test-11-error-in-code/bake/main.c diff --git a/tests/C/test-11-error-in-code/make/Makefile b/tests/test-11-error-in-code/make/Makefile similarity index 100% rename from tests/C/test-11-error-in-code/make/Makefile rename to tests/test-11-error-in-code/make/Makefile diff --git a/tests/C/test-11-error-in-code/make/main.c b/tests/test-11-error-in-code/make/main.c similarity index 100% rename from tests/C/test-11-error-in-code/make/main.c rename to tests/test-11-error-in-code/make/main.c diff --git a/tests/C/test-12-file-dont-exist/README.md b/tests/test-12-file-dont-exist/README.md similarity index 100% rename from tests/C/test-12-file-dont-exist/README.md rename to tests/test-12-file-dont-exist/README.md diff --git a/tests/C/test-12-file-dont-exist/bake/Bakefile b/tests/test-12-file-dont-exist/bake/Bakefile similarity index 100% rename from tests/C/test-12-file-dont-exist/bake/Bakefile rename to tests/test-12-file-dont-exist/bake/Bakefile diff --git a/tests/C/test-12-file-dont-exist/make/Makefile b/tests/test-12-file-dont-exist/make/Makefile similarity index 100% rename from tests/C/test-12-file-dont-exist/make/Makefile rename to tests/test-12-file-dont-exist/make/Makefile diff --git a/tests/C/test-13-dependancy-dont-exist/README.md b/tests/test-13-dependancy-dont-exist/README.md similarity index 100% rename from tests/C/test-13-dependancy-dont-exist/README.md rename to tests/test-13-dependancy-dont-exist/README.md diff --git a/tests/C/test-13-dependancy-dont-exist/bake/Bakefile b/tests/test-13-dependancy-dont-exist/bake/Bakefile similarity index 100% rename from tests/C/test-13-dependancy-dont-exist/bake/Bakefile rename to tests/test-13-dependancy-dont-exist/bake/Bakefile diff --git a/tests/C/test-13-dependancy-dont-exist/bake/main.c b/tests/test-13-dependancy-dont-exist/bake/main.c similarity index 100% rename from tests/C/test-13-dependancy-dont-exist/bake/main.c rename to tests/test-13-dependancy-dont-exist/bake/main.c diff --git a/tests/C/test-13-dependancy-dont-exist/make/Makefile b/tests/test-13-dependancy-dont-exist/make/Makefile similarity index 100% rename from tests/C/test-13-dependancy-dont-exist/make/Makefile rename to tests/test-13-dependancy-dont-exist/make/Makefile diff --git a/tests/C/test-13-dependancy-dont-exist/make/main.c b/tests/test-13-dependancy-dont-exist/make/main.c similarity index 100% rename from tests/C/test-13-dependancy-dont-exist/make/main.c rename to tests/test-13-dependancy-dont-exist/make/main.c diff --git a/tests/C/test-14-remove-source-and-rebuild/README.md b/tests/test-14-remove-source-and-rebuild/README.md similarity index 100% rename from tests/C/test-14-remove-source-and-rebuild/README.md rename to tests/test-14-remove-source-and-rebuild/README.md diff --git a/tests/C/test-14-remove-source-and-rebuild/bake/Bakefile b/tests/test-14-remove-source-and-rebuild/bake/Bakefile similarity index 100% rename from tests/C/test-14-remove-source-and-rebuild/bake/Bakefile rename to tests/test-14-remove-source-and-rebuild/bake/Bakefile diff --git a/tests/C/test-14-remove-source-and-rebuild/bake/test.c b/tests/test-14-remove-source-and-rebuild/bake/test.c similarity index 100% rename from tests/C/test-14-remove-source-and-rebuild/bake/test.c rename to tests/test-14-remove-source-and-rebuild/bake/test.c diff --git a/tests/C/test-14-remove-source-and-rebuild/make/Makefile b/tests/test-14-remove-source-and-rebuild/make/Makefile similarity index 100% rename from tests/C/test-14-remove-source-and-rebuild/make/Makefile rename to tests/test-14-remove-source-and-rebuild/make/Makefile diff --git a/tests/C/test-14-remove-source-and-rebuild/make/test.c b/tests/test-14-remove-source-and-rebuild/make/test.c similarity index 100% rename from tests/C/test-14-remove-source-and-rebuild/make/test.c rename to tests/test-14-remove-source-and-rebuild/make/test.c diff --git a/tests/C/test-15-subdir-build/README.md b/tests/test-15-subdir-build/README.md similarity index 100% rename from tests/C/test-15-subdir-build/README.md rename to tests/test-15-subdir-build/README.md diff --git a/tests/C/test-15-subdir-build/bake/Bakefile b/tests/test-15-subdir-build/bake/Bakefile similarity index 100% rename from tests/C/test-15-subdir-build/bake/Bakefile rename to tests/test-15-subdir-build/bake/Bakefile diff --git a/tests/C/test-15-subdir-build/bake/src/main.c b/tests/test-15-subdir-build/bake/src/main.c similarity index 100% rename from tests/C/test-15-subdir-build/bake/src/main.c rename to tests/test-15-subdir-build/bake/src/main.c diff --git a/tests/C/test-15-subdir-build/make/Makefile b/tests/test-15-subdir-build/make/Makefile similarity index 100% rename from tests/C/test-15-subdir-build/make/Makefile rename to tests/test-15-subdir-build/make/Makefile diff --git a/tests/C/test-15-subdir-build/make/src/main.c b/tests/test-15-subdir-build/make/src/main.c similarity index 100% rename from tests/C/test-15-subdir-build/make/src/main.c rename to tests/test-15-subdir-build/make/src/main.c diff --git a/tests/C/test-16-strange-variables/README.md b/tests/test-16-strange-variables/README.md similarity index 100% rename from tests/C/test-16-strange-variables/README.md rename to tests/test-16-strange-variables/README.md diff --git a/tests/C/test-16-strange-variables/bake/Bakefile b/tests/test-16-strange-variables/bake/Bakefile similarity index 100% rename from tests/C/test-16-strange-variables/bake/Bakefile rename to tests/test-16-strange-variables/bake/Bakefile diff --git a/tests/C/test-16-strange-variables/bake/main.c b/tests/test-16-strange-variables/bake/main.c similarity index 100% rename from tests/C/test-16-strange-variables/bake/main.c rename to tests/test-16-strange-variables/bake/main.c diff --git a/tests/C/test-16-strange-variables/bake/module.c b/tests/test-16-strange-variables/bake/module.c similarity index 100% rename from tests/C/test-16-strange-variables/bake/module.c rename to tests/test-16-strange-variables/bake/module.c diff --git a/tests/C/test-16-strange-variables/bake/module.h b/tests/test-16-strange-variables/bake/module.h similarity index 100% rename from tests/C/test-16-strange-variables/bake/module.h rename to tests/test-16-strange-variables/bake/module.h diff --git a/tests/C/test-16-strange-variables/make/Makefile b/tests/test-16-strange-variables/make/Makefile similarity index 100% rename from tests/C/test-16-strange-variables/make/Makefile rename to tests/test-16-strange-variables/make/Makefile diff --git a/tests/C/test-16-strange-variables/make/main.c b/tests/test-16-strange-variables/make/main.c similarity index 100% rename from tests/C/test-16-strange-variables/make/main.c rename to tests/test-16-strange-variables/make/main.c diff --git a/tests/C/test-16-strange-variables/make/module.c b/tests/test-16-strange-variables/make/module.c similarity index 100% rename from tests/C/test-16-strange-variables/make/module.c rename to tests/test-16-strange-variables/make/module.c diff --git a/tests/C/test-16-strange-variables/make/module.h b/tests/test-16-strange-variables/make/module.h similarity index 100% rename from tests/C/test-16-strange-variables/make/module.h rename to tests/test-16-strange-variables/make/module.h diff --git a/tests/C/test-17-rule-without-command/README.md b/tests/test-17-rule-without-command/README.md similarity index 100% rename from tests/C/test-17-rule-without-command/README.md rename to tests/test-17-rule-without-command/README.md diff --git a/tests/C/test-17-rule-without-command/bake/Bakefile b/tests/test-17-rule-without-command/bake/Bakefile similarity index 100% rename from tests/C/test-17-rule-without-command/bake/Bakefile rename to tests/test-17-rule-without-command/bake/Bakefile diff --git a/tests/C/test-17-rule-without-command/make/Makefile b/tests/test-17-rule-without-command/make/Makefile similarity index 100% rename from tests/C/test-17-rule-without-command/make/Makefile rename to tests/test-17-rule-without-command/make/Makefile diff --git a/tests/C/test-18-path-characters/bake/Bakefile b/tests/test-18-path-characters/bake/Bakefile similarity index 100% rename from tests/C/test-18-path-characters/bake/Bakefile rename to tests/test-18-path-characters/bake/Bakefile diff --git a/tests/C/test-18-path-characters/make/Makefile b/tests/test-18-path-characters/make/Makefile similarity index 100% rename from tests/C/test-18-path-characters/make/Makefile rename to tests/test-18-path-characters/make/Makefile diff --git a/tests/C/test-19-multiple-targets/bake/Bakefile b/tests/test-19-multiple-targets/bake/Bakefile similarity index 100% rename from tests/C/test-19-multiple-targets/bake/Bakefile rename to tests/test-19-multiple-targets/bake/Bakefile diff --git a/tests/C/test-19-multiple-targets/make/Makefile b/tests/test-19-multiple-targets/make/Makefile similarity index 100% rename from tests/C/test-19-multiple-targets/make/Makefile rename to tests/test-19-multiple-targets/make/Makefile diff --git a/tests/C/test-20-circular-2/bake/Bakefile b/tests/test-20-circular-2/bake/Bakefile similarity index 100% rename from tests/C/test-20-circular-2/bake/Bakefile rename to tests/test-20-circular-2/bake/Bakefile diff --git a/tests/C/test-20-circular-2/make/Makefile b/tests/test-20-circular-2/make/Makefile similarity index 100% rename from tests/C/test-20-circular-2/make/Makefile rename to tests/test-20-circular-2/make/Makefile diff --git a/tests/C/test-21-generate/bake/Bakefile b/tests/test-21-generate/bake/Bakefile similarity index 100% rename from tests/C/test-21-generate/bake/Bakefile rename to tests/test-21-generate/bake/Bakefile diff --git a/tests/C/test-21-generate/make/Makefile b/tests/test-21-generate/make/Makefile similarity index 100% rename from tests/C/test-21-generate/make/Makefile rename to tests/test-21-generate/make/Makefile diff --git a/tests/C/test-22-future-timestamp/README.md b/tests/test-22-future-timestamp/README.md similarity index 100% rename from tests/C/test-22-future-timestamp/README.md rename to tests/test-22-future-timestamp/README.md diff --git a/tests/C/test-22-future-timestamp/bake/Bakefile b/tests/test-22-future-timestamp/bake/Bakefile similarity index 100% rename from tests/C/test-22-future-timestamp/bake/Bakefile rename to tests/test-22-future-timestamp/bake/Bakefile diff --git a/tests/C/test-22-future-timestamp/bake/main b/tests/test-22-future-timestamp/bake/main similarity index 100% rename from tests/C/test-22-future-timestamp/bake/main rename to tests/test-22-future-timestamp/bake/main diff --git a/tests/C/test-22-future-timestamp/bake/main.c b/tests/test-22-future-timestamp/bake/main.c similarity index 100% rename from tests/C/test-22-future-timestamp/bake/main.c rename to tests/test-22-future-timestamp/bake/main.c diff --git a/tests/C/test-22-future-timestamp/make/Makefile b/tests/test-22-future-timestamp/make/Makefile similarity index 100% rename from tests/C/test-22-future-timestamp/make/Makefile rename to tests/test-22-future-timestamp/make/Makefile diff --git a/tests/C/test-22-future-timestamp/make/main b/tests/test-22-future-timestamp/make/main similarity index 100% rename from tests/C/test-22-future-timestamp/make/main rename to tests/test-22-future-timestamp/make/main diff --git a/tests/C/test-22-future-timestamp/make/main.c b/tests/test-22-future-timestamp/make/main.c similarity index 100% rename from tests/C/test-22-future-timestamp/make/main.c rename to tests/test-22-future-timestamp/make/main.c diff --git a/tests/C/test-22-future-timestamp/run_test22.sh b/tests/test-22-future-timestamp/run_test22.sh similarity index 100% rename from tests/C/test-22-future-timestamp/run_test22.sh rename to tests/test-22-future-timestamp/run_test22.sh diff --git a/tests/C/test-23-identical-timestamps/bake/Bakefile b/tests/test-23-identical-timestamps/bake/Bakefile similarity index 100% rename from tests/C/test-23-identical-timestamps/bake/Bakefile rename to tests/test-23-identical-timestamps/bake/Bakefile diff --git a/tests/C/test-23-identical-timestamps/bake/input.txt b/tests/test-23-identical-timestamps/bake/input.txt similarity index 100% rename from tests/C/test-23-identical-timestamps/bake/input.txt rename to tests/test-23-identical-timestamps/bake/input.txt diff --git a/tests/C/test-23-identical-timestamps/bake/output.txt b/tests/test-23-identical-timestamps/bake/output.txt similarity index 100% rename from tests/C/test-23-identical-timestamps/bake/output.txt rename to tests/test-23-identical-timestamps/bake/output.txt diff --git a/tests/C/test-23-identical-timestamps/make/Makefile b/tests/test-23-identical-timestamps/make/Makefile similarity index 100% rename from tests/C/test-23-identical-timestamps/make/Makefile rename to tests/test-23-identical-timestamps/make/Makefile diff --git a/tests/C/test-23-identical-timestamps/make/input.txt b/tests/test-23-identical-timestamps/make/input.txt similarity index 100% rename from tests/C/test-23-identical-timestamps/make/input.txt rename to tests/test-23-identical-timestamps/make/input.txt diff --git a/tests/C/test-23-identical-timestamps/make/output.txt b/tests/test-23-identical-timestamps/make/output.txt similarity index 100% rename from tests/C/test-23-identical-timestamps/make/output.txt rename to tests/test-23-identical-timestamps/make/output.txt diff --git a/tests/C/test-24-50target/bake/Bakefile b/tests/test-24-50target/bake/Bakefile similarity index 100% rename from tests/C/test-24-50target/bake/Bakefile rename to tests/test-24-50target/bake/Bakefile diff --git a/tests/C/test-24-50target/make/Makefile b/tests/test-24-50target/make/Makefile similarity index 100% rename from tests/C/test-24-50target/make/Makefile rename to tests/test-24-50target/make/Makefile diff --git a/tests/C/test-25-multilines/README.md b/tests/test-25-multilines/README.md similarity index 100% rename from tests/C/test-25-multilines/README.md rename to tests/test-25-multilines/README.md diff --git a/tests/C/test-25-multilines/bake/Bakefile b/tests/test-25-multilines/bake/Bakefile similarity index 100% rename from tests/C/test-25-multilines/bake/Bakefile rename to tests/test-25-multilines/bake/Bakefile diff --git a/tests/C/test-25-multilines/make/Makefile b/tests/test-25-multilines/make/Makefile similarity index 100% rename from tests/C/test-25-multilines/make/Makefile rename to tests/test-25-multilines/make/Makefile