Skip to content

Commit

Permalink
fix testing a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
serkonda7 committed Dec 11, 2023
1 parent 4687d00 commit 23d2fc4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 48 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
bait build-examples -b js
bait build-examples -b c
- name: Run compiler tests
run: bait test-self
run: bait test tests
- name: Run lib tests
run: bait test lib
- name: Run tool tests
run: bait test-tools
run: bait test cli/tools
- name: Check markdown code blocks
run: |
bait check-md docs/docs.md
Expand All @@ -51,9 +53,11 @@ jobs:
- name: Build examples
run: bait build-examples
- name: Run compiler tests
run: bait test-self
run: bait test tests
- name: Run lib tests
run: bait test lib
- name: Run tool tests
run: bait test-tools
run: bait test cli/tools
- name: Check markdown code blocks
run: |
bait check-md docs/docs.md
Expand Down
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ All notable changes will be documented in this file.
_unreleased_

### Breaking
- Remove tool `test-lib`
- Remove tools `test-lib` and `test-tools`
- All standard library tests can be run with `bait test lib`
- Compiler tests can be run with `bait test-self`
- Compiler tests can be run with `bait test tests`
- Tool tests can be run with `bait test cli/tools`

### Generics
- Check that concrete types for each generic type match
Expand Down Expand Up @@ -42,6 +43,7 @@ _unreleased_
- Various fixes related to breaking compiler changes

### Testing
- builder: Fix testing a directory with multiple test files
- `bait.util.testing`
- Many BuildRunner improvements
- New field `oks` to check number of successful runs
Expand Down Expand Up @@ -289,7 +291,7 @@ _10 May 2023_
- `build` command (it can be omitted)
- `run`, `version` and `doctor` commands
- move `help`, `self` and `up` into tools
- build-examples`, `build-tools`, `check-md`, `test-self` and `test-all` tools
- `build-examples`, `build-tools`, `check-md`, `test-self` and `test-all` tools
- `build`: add `--script` option to enable script mode, where no main function is required
- `self`: backup the bait.js file

Expand Down
2 changes: 0 additions & 2 deletions cli/bait.bt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const TOOLS := [
'doctor',
'help',
'test-all',
'test-self',
'test-tools',
'build-examples',
'build-tools',
'check-md',
Expand Down
1 change: 0 additions & 1 deletion cli/tools/help/topics/other.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Other commands:
symlink Create a symbolic link for the wrapper script.

test-all Run most checks of the CI pipeline locally.
test-self Run all compiler and lib tests.
build-examples Test if all examples can be built.
build-tools Test if all tools can be built.
check-md Check that Bait code blocks in markdown files can compile.
3 changes: 2 additions & 1 deletion cli/tools/test-all.bt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ package main

import os

const TOOLS := ['build-examples', 'build-tools', 'test-self', 'test-tools']
const TOOLS := ['build-examples', 'build-tools']

const TOOLS_WITH_ARGS := map{
'test': ['tools', 'lib', 'tests']
'check-md': ['docs/docs.md', 'README.md']
}

Expand Down
20 changes: 0 additions & 20 deletions cli/tools/test-self.bt

This file was deleted.

17 changes: 0 additions & 17 deletions cli/tools/test-tools.bt

This file was deleted.

1 change: 1 addition & 0 deletions lib/bait/builder/builder.bt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pub fun compile(prefs preference.Prefs) i32 {
mut paths := b.get_user_files(prefs.command)
mut files := []ast.File
for p in paths {
b.prefs.expected_pkg = ''
files.push(b.parse_source_file(p))
}

Expand Down

0 comments on commit 23d2fc4

Please sign in to comment.