Skip to content

Commit

Permalink
#2 fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalSmile committed Jul 8, 2024
1 parent b5a541f commit 2d90d01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
with:
java-version: '22'
distribution: 'corretto'
- name: Install headers for test
run: sudo apt-get install -y linux-libc-dev
- name: Getting linux header version for tests
run: |
echo "headerVersion=$(uname -r)" >> "$GITHUB_ENV"
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build Gradle
run: ./gradlew build
run: |
./gradlew build :annotation-processor-test:build -DheaderVersion=$headerVersion
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import io.github.digitalsmile.annotation.structure.Structs;
import io.github.digitalsmile.annotation.structure.Unions;

@NativeMemory(headers = "/usr/src/linux-headers-5.15.0-113/include/uapi/linux/gpio.h")
@NativeMemory(headers = "/usr/src/linux-headers-${version}/include/uapi/linux/gpio.h")
@NativeMemoryOptions(
processRootConstants = true
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ private List<Path> getHeaderPaths(String[] headerFiles) {
for (String headerFile : headerFiles) {
Path headerPath;
if (headerFile.startsWith("/")) {
headerFile = headerFile.replace("${version}", System.getProperty("headerVersion"));
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, headerFile);
headerPath = Path.of(headerFile);
} else {
Path rootPath;
Expand Down

0 comments on commit 2d90d01

Please sign in to comment.