Skip to content

Commit 2710f8a

Browse files
Sources README: update typical commands from internal README
1 parent dabe04a commit 2710f8a

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Source/README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You look at and build the framework itself via `ios-framework/ObjectBox.xcodepro
4949

5050
## Development
5151

52-
- Ensure the latest Xcode is installed (Swift 5.3+, command line tools should be included).
52+
- Ensure a recent Xcode version is installed (see section below, Swift 5.9+).
5353
- Ensure [homebrew](https://brew.sh/) is installed, e.g. setup.sh uses it.
5454
- Ensure [rbenv](https://github.com/rbenv/rbenv) and ruby is installed, see section below.
5555
- Run `./setup.sh` or see [setup.sh](setup.sh) and only run what is needed.
@@ -58,33 +58,37 @@ You look at and build the framework itself via `ios-framework/ObjectBox.xcodepro
5858

5959
Open the Xcode project in `ios-framework/ObjectBox.xcodeproj`.
6060

61-
From the command line:
61+
Then some typical commands to use:
6262

6363
```shell
6464
# Enter the framework directory
6565
cd ios-framework/
6666

67-
# Build the generator
68-
make build_generator
67+
# Download the ObjectBox database libraries
68+
make fetch_dependencies
69+
6970
# Build the framework
7071
make build_framework
72+
# Run unit tests
73+
make u_tests
7174

72-
# Execute all tests
73-
make test
74-
# Execute specific tests
75-
make unit_tests
76-
make generator_tests
75+
# Build a debug version of the generator
76+
make build_generator_debug
77+
# Run generator tests
78+
make g_tests_run
7779
```
7880

79-
**To execute a specific test** change the last argument to specify your test. You can also execute a group/class by removing the last one/two parts of the filter.
81+
**To run a specific unit test** change the last argument to specify your test. You can also run a group/class by removing the last one/two parts of the filter.
8082
Note: `xcpretty` cleans up the output so you won't see all the compiler calls but it also hides failed tests output. So once you see a failure, run without `xcpretty` to read the error.
8183

8284
```shell
8385
xcodebuild -derivedDataPath ./DerivedData test -project ObjectBox.xcodeproj -scheme ObjectBox-macOS -destination 'platform=OS X,arch=x86_64' -only-testing ObjectBoxTests-macOS/StoreTests/test32vs64BitForOs | xcpretty
8486
xcodebuild -derivedDataPath ./DerivedData test -project ObjectBox.xcodeproj -scheme ObjectBox-iOS -destination 'platform=iOS Simulator,name=iPhone 11' -only-testing ObjectBoxTests-iOS/StoreTests/test32vs64BitForOs | xcpretty
8587
```
8688

87-
**To run tests with an in-memory database** set the following environment variable before running an xcodebuild command:
89+
**To run a specific generator test** comment out other tests in [the run script](ios-framework/CodeGenTests/RunToolTests.sh).
90+
91+
**To run unit tests with an in-memory database** set the following environment variable before running an xcodebuild command:
8892

8993
```shell
9094
export OBX_IN_MEMORY=true

0 commit comments

Comments
 (0)