-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
285 changed files
with
27,889 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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,67 @@ | ||
# Generated from CLion C/C++ Code Style settings | ||
BasedOnStyle: LLVM | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: Consecutive | ||
AlignConsecutiveMacros: AcrossEmptyLinesAndComments | ||
AlignOperands: Align | ||
AllowAllArgumentsOnNextLine: false | ||
AllowAllConstructorInitializersOnNextLine: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: Always | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: Always | ||
AllowShortLambdasOnASingleLine: All | ||
AllowShortLoopsOnASingleLine: true | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakTemplateDeclarations: Yes | ||
BreakBeforeBraces: Custom | ||
BraceWrapping: | ||
AfterCaseLabel: false | ||
AfterClass: false | ||
AfterControlStatement: Never | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterUnion: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
SplitEmptyRecord: true | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializers: BeforeColon | ||
BreakInheritanceList: BeforeColon | ||
ColumnLimit: 0 | ||
CompactNamespaces: false | ||
ContinuationIndentWidth: 8 | ||
IndentCaseLabels: true | ||
IndentPPDirectives: None | ||
IndentWidth: 4 | ||
KeepEmptyLinesAtTheStartOfBlocks: true | ||
MaxEmptyLinesToKeep: 2 | ||
NamespaceIndentation: All | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: true | ||
PointerAlignment: Right | ||
ReflowComments: false | ||
SpaceAfterCStyleCast: true | ||
SpaceAfterLogicalNot: false | ||
SpaceAfterTemplateKeyword: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeCpp11BracedList: false | ||
SpaceBeforeCtorInitializerColon: true | ||
SpaceBeforeInheritanceColon: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInContainerLiterals: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
TabWidth: 4 | ||
UseTab: Never |
This file contains 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,5 @@ | ||
FROM ghcr.io/wiiu-env/devkitppc:20230218 | ||
|
||
COPY --from=ghcr.io/wiiu-env/wiiupluginsystem:20230215 /artifacts $DEVKITPRO | ||
|
||
WORKDIR project |
This file contains 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,143 @@ | ||
#------------------------------------------------------------------------------- | ||
.SUFFIXES: | ||
#------------------------------------------------------------------------------- | ||
|
||
ifeq ($(strip $(DEVKITPRO)),) | ||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro") | ||
endif | ||
|
||
TOPDIR ?= $(CURDIR) | ||
|
||
include $(DEVKITPRO)/wups/share/wups_rules | ||
|
||
WUT_ROOT := $(DEVKITPRO)/wut | ||
#------------------------------------------------------------------------------- | ||
# TARGET is the name of the output | ||
# BUILD is the directory where object files & intermediate files will be placed | ||
# SOURCES is a list of directories containing source code | ||
# DATA is a list of directories containing data files | ||
# INCLUDES is a list of directories containing header files | ||
#------------------------------------------------------------------------------- | ||
TARGET := StorageTestPlugin | ||
BUILD := build | ||
SOURCES := src src/utils \ | ||
src/catch2 \ | ||
src/catch2/benchmark \ | ||
src/catch2/generators \ | ||
src/catch2/interfaces \ | ||
src/catch2/internal \ | ||
src/catch2/matchers \ | ||
src/catch2/matchers/internal \ | ||
src/catch2/reporters \ | ||
DATA := data | ||
INCLUDES := src | ||
|
||
#------------------------------------------------------------------------------- | ||
# options for code generation | ||
#------------------------------------------------------------------------------- | ||
CFLAGS := -g -Wall -O2 -ffunction-sections \ | ||
$(MACHDEP) | ||
|
||
CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ -D__WUPS__ | ||
|
||
CXXFLAGS := $(CFLAGS) | ||
|
||
ASFLAGS := -g $(ARCH) | ||
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) $(WUPSSPECS) | ||
|
||
LIBS := -lwups -lwut | ||
|
||
#------------------------------------------------------------------------------- | ||
# list of directories containing libraries, this must be the top level | ||
# containing include and lib | ||
#------------------------------------------------------------------------------- | ||
LIBDIRS := $(PORTLIBS) $(WUPS_ROOT) $(WUT_ROOT) | ||
|
||
#------------------------------------------------------------------------------- | ||
# no real need to edit anything past this point unless you need to add additional | ||
# rules for different file extensions | ||
#------------------------------------------------------------------------------- | ||
ifneq ($(BUILD),$(notdir $(CURDIR))) | ||
#------------------------------------------------------------------------------- | ||
|
||
export OUTPUT := $(CURDIR)/$(TARGET) | ||
export TOPDIR := $(CURDIR) | ||
|
||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ | ||
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) | ||
|
||
export DEPSDIR := $(CURDIR)/$(BUILD) | ||
|
||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) | ||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) | ||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) | ||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) | ||
|
||
#------------------------------------------------------------------------------- | ||
# use CXX for linking C++ projects, CC for standard C | ||
#------------------------------------------------------------------------------- | ||
ifeq ($(strip $(CPPFILES)),) | ||
#------------------------------------------------------------------------------- | ||
export LD := $(CC) | ||
#------------------------------------------------------------------------------- | ||
else | ||
#------------------------------------------------------------------------------- | ||
export LD := $(CXX) | ||
#------------------------------------------------------------------------------- | ||
endif | ||
#------------------------------------------------------------------------------- | ||
|
||
export OFILES_BIN := $(addsuffix .o,$(BINFILES)) | ||
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) | ||
export OFILES := $(OFILES_BIN) $(OFILES_SRC) | ||
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) | ||
|
||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ | ||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \ | ||
-I$(CURDIR)/$(BUILD) | ||
|
||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) | ||
|
||
.PHONY: $(BUILD) clean all | ||
|
||
#------------------------------------------------------------------------------- | ||
all: $(BUILD) | ||
|
||
$(BUILD): | ||
@[ -d $@ ] || mkdir -p $@ | ||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile | ||
|
||
#------------------------------------------------------------------------------- | ||
clean: | ||
@echo clean ... | ||
@rm -fr $(BUILD) $(TARGET).wps $(TARGET).elf | ||
|
||
#------------------------------------------------------------------------------- | ||
else | ||
.PHONY: all | ||
|
||
DEPENDS := $(OFILES:.o=.d) | ||
|
||
#------------------------------------------------------------------------------- | ||
# main targets | ||
#------------------------------------------------------------------------------- | ||
all : $(OUTPUT).wps | ||
|
||
$(OUTPUT).wps : $(OUTPUT).elf | ||
$(OUTPUT).elf : $(OFILES) | ||
|
||
$(OFILES_SRC) : $(HFILES_BIN) | ||
|
||
#------------------------------------------------------------------------------- | ||
# you need a rule like this for each extension you use as binary data | ||
#------------------------------------------------------------------------------- | ||
%.bin.o %_bin.h : %.bin | ||
#------------------------------------------------------------------------------- | ||
@echo $(notdir $<) | ||
@$(bin2o) | ||
|
||
-include $(DEPENDS) | ||
|
||
#------------------------------------------------------------------------------- | ||
endif | ||
#------------------------------------------------------------------------------- |
This file contains 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,55 @@ | ||
# Storage test plugin | ||
|
||
This plugin implements multiple tests of StorageAPI. Results will be printed to the OSConsole ([USBSerialLoggingModule](https://github.com/wiiu-env/USBSerialLoggingModule)) | ||
|
||
## Installation | ||
|
||
(`[ENVIRONMENT]` is a placeholder for the actual environment name.) | ||
|
||
1. Requires the [WiiUPluginLoaderBackend](https://github.com/wiiu-env/WiiUPluginLoaderBackend) in `sd:/wiiu/environments/[ENVIRONMENT]/modules`. | ||
|
||
It's recommened to [wiiload](https://github.com/wiiu-env/wiiload_plugin) this plugin whenever you want to run the test. | ||
|
||
This plugin uses [Catch2](https://github.com/catchorg/Catch2) for running tests. | ||
|
||
## Building | ||
|
||
For building you need: | ||
|
||
- [wups](https://github.com/Maschell/WiiUPluginSystem) | ||
- [wut](https://github.com/devkitpro/wut) | ||
|
||
Install them (in this order) according to their README's. Don't forget the dependencies of the libs itself. | ||
|
||
Then you should be able to compile via `make` (with no logging) or `make DEBUG=1` (with logging). | ||
|
||
## Buildflags | ||
|
||
### Logging | ||
|
||
Building via `make` only logs errors (via OSReport). To enable logging via the [LoggingModule](https://github.com/wiiu-env/LoggingModule) set `DEBUG` to `1` or `VERBOSE`. | ||
|
||
`make` Logs errors only (via OSReport). | ||
`make DEBUG=1` Enables information and error logging via [LoggingModule](https://github.com/wiiu-env/LoggingModule). | ||
`make DEBUG=VERBOSE` Enables verbose information and error logging via [LoggingModule](https://github.com/wiiu-env/LoggingModule). | ||
|
||
If the [LoggingModule](https://github.com/wiiu-env/LoggingModule) is not present, it'll fallback to UDP (Port 4405) and [CafeOS](https://github.com/wiiu-env/USBSerialLoggingModule) logging. | ||
|
||
## Building using the Dockerfile | ||
|
||
It's possible to use a docker image for building. This way you don't need anything installed on your host system. | ||
|
||
``` | ||
# Build docker image (only needed once) | ||
docker build . -t storage-test-plugin-builder | ||
# make | ||
docker run -it --rm -v ${PWD}:/project storage-test-plugin-builder make DEBUG=1 | ||
# make clean | ||
docker run -it --rm -v ${PWD}:/project storage-test-plugin-builder make clean | ||
``` | ||
|
||
## Format the code via docker | ||
|
||
`docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src --exclude ./src/catch2 -i` |
Oops, something went wrong.