Repository navigation
fix runtime and translator correctness #420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+4,772
−389
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
79340b2
fix runtime and translator correctness
patchzyy f3c8fea
limit memory fault test to supported hosts
patchzyy 2f96f91
build all registered macos tests
patchzyy 73bada9
fix config recovery and constructor exceptions
patchzyy 542e4ad
update aurora correctness fixes
patchzyy d8d8ae6
update controller save fixes
patchzyy dc2885e
reject stale linux aurora packages
patchzyy 01a4f95
update aurora linux test linkage
patchzyy be4dc84
handle literal paths in package checks
patchzyy 03fa7c6
match linux package sources
patchzyy 9d4df40
reject empty aurora checkouts
patchzyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| launcher=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | ||
| scratch=$(mktemp -d) | ||
| trap 'rm -rf "$scratch"' EXIT | ||
| cd "$scratch" | ||
| mkdir -p 'workspace/aurora-main/include' package | ||
| cd workspace/aurora-main | ||
| printf 'project(aurora)\n' > CMakeLists.txt | ||
| printf 'header\n' > 'include/a header.h' | ||
| # Manifest format used by existing Linux packages. | ||
| fingerprint=$( | ||
| for path in CMakeLists.txt 'include/a header.h'; do | ||
| printf '%s %s\n' "$path" "$(sha256sum < "$path" | cut -d ' ' -f 1)" | ||
| done | sha256sum | cut -d ' ' -f 1 | ||
| ) | ||
| mkdir -p .git extern build | ||
| touch .git/config extern/dependency build/object | ||
| cd ../.. | ||
| if command -v shasum >/dev/null 2>&1; then | ||
| mkdir fallback-tools | ||
| for tool in shasum awk find sort xargs; do | ||
| ln -s "$(command -v "$tool")" "fallback-tools/$tool" | ||
| done | ||
| ( | ||
| PATH="$PWD/fallback-tools" | ||
| source "$launcher/build-cache.sh" | ||
| [[ $(mkw_fingerprint_tree workspace/aurora-main extern build) == "$fingerprint" ]] | ||
| ) | ||
| fi | ||
| touch package/native_prebuilt.cmake | ||
| args=(--workspace workspace --output-dir output --translator-bin unused | ||
| --cc true --cxx true --ninja true --x86-cpu-profile v2 --native-prebuilt-dir package) | ||
| expect_error() { | ||
| local expected=$1 output | ||
| if output=$(bash "$launcher/local-build.sh" "${args[@]}" 2>&1); then | ||
| echo "unexpected build success" >&2 | ||
| exit 1 | ||
| fi | ||
| if [[ "$output" != *"$expected"* ]]; then | ||
| printf 'expected %s, got %s\n' "$expected" "$output" >&2 | ||
| exit 1 | ||
| fi | ||
| } | ||
| expect_error 'Native prebuilt provenance is missing' | ||
| printf '{"AuroraSourceFingerprint":"%s"}\n' "$fingerprint" > package/provenance.json | ||
| expect_error 'Extracted main.dol' | ||
| mv workspace 'workspace[old]' | ||
| args[1]='workspace[old]' | ||
| expect_error 'Extracted main.dol' | ||
| printf 'edited\n' >> 'workspace[old]/aurora-main/include/a header.h' | ||
| expect_error 'does not match the Aurora sources' | ||
| printf 'header\n' > 'workspace[old]/aurora-main/include/a header.h' | ||
| for invalid in '{}' 'null' 'not json' '{"AuroraSourceFingerprint":false}' \ | ||
| "{\"nested\":{\"AuroraSourceFingerprint\":\"$fingerprint\"}}"; do | ||
| printf '%s\n' "$invalid" > package/provenance.json | ||
| expect_error 'does not match the Aurora sources' | ||
| done | ||
|
|
||
| mkdir -p producer/{Launcher,aurora-main,runtime/{third_party,cmake},tools/bin} | ||
| cp "$launcher"/{Prepare-NativePrebuilt.sh,build-cache.sh} producer/Launcher/ | ||
| touch producer/runtime/cmake/MbedTLSPin.cmake producer/tools/bin/{clang,clang++,clang-22} | ||
| producer_args=(--arch aarch64 --print-fingerprint-only --toolchain-dir "$PWD/producer/tools" | ||
| --cmake-bin /bin/true --ninja-bin /bin/true) | ||
| if output=$(bash producer/Launcher/Prepare-NativePrebuilt.sh "${producer_args[@]}" 2>&1); then | ||
| echo 'accepted an empty aurora checkout' >&2 | ||
| exit 1 | ||
| fi | ||
| [[ "$output" == *'aurora-main/CMakeLists.txt'* ]] | ||
| cp 'workspace[old]/aurora-main/CMakeLists.txt' producer/aurora-main/ | ||
| output=$(bash producer/Launcher/Prepare-NativePrebuilt.sh "${producer_args[@]}") | ||
| [[ "$output" =~ aurora_fingerprint=[0-9a-f]{64} ]] | ||
|
patchzyy marked this conversation as resolved.
Resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule aurora-main
updated
12 files
| +1 −0 | cmake/aurora_core.cmake | |
| +2 −0 | include/dolphin/gx/GXGeometry.h | |
| +236 −72 | lib/dolphin/pad/pad.cpp | |
| +18 −8 | lib/gamepad.hpp | |
| +8 −9 | tests/CMakeLists.txt | |
| +3 −2 | tests/gfx_readback_test.cpp | |
| +1 −1 | tests/gx_fifo_test.cpp | |
| +23 −1 | tests/gx_test_stubs.cpp | |
| +47 −0 | tests/gx_texture_cache_test.cpp | |
| +8 −0 | tests/gx_texture_cache_test_stubs.cpp | |
| +2 −2 | tests/pad_adapter_test.cpp | |
| +556 −0 | tests/pad_mapping_test.cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| cmake_minimum_required(VERSION 3.20) | ||
|
|
||
| file(READ "${PROVENANCE_FILE}" _provenance) | ||
| string(JSON _recorded ERROR_VARIABLE _error GET "${_provenance}" AuroraSourceFingerprint) | ||
| if(_error OR NOT _recorded STREQUAL AURORA_FINGERPRINT) | ||
| message(FATAL_ERROR "Native prebuilt package does not match the Aurora sources. Regenerate it with Prepare-NativePrebuilt.sh or omit --native-prebuilt-dir.") | ||
| endif() |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.