mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-11-23 06:09:41 +00:00
Remove rooibos test framework
This commit is contained in:
parent
9a2c1a1535
commit
607107ebb8
5
.gitignore
vendored
5
.gitignore
vendored
@ -12,11 +12,6 @@ roku_modules
|
||||
#NPM modules
|
||||
node_modules/
|
||||
|
||||
#Rooibos generated
|
||||
rooibosFunctionMap.brs
|
||||
*/buildinfo.brs
|
||||
logs
|
||||
|
||||
#Eclipse
|
||||
.buildpath
|
||||
.project
|
||||
|
25
DEVGUIDE.md
25
DEVGUIDE.md
@ -130,37 +130,12 @@ Modify code -> `make install` -> Use Roku remote to test changes -> `telnet ${RO
|
||||
|
||||
Unfortunately there is no debuger. You will need to use telnet to see log statements, warnings, and error reports. You won't always need to telnet into your device but the workflow above is typical when you are new to Brightscript or are working on tricky code.
|
||||
|
||||
### Testing
|
||||
|
||||
Testing is done with the [Rooibos](https://github.com/georgejecook/rooibos/) library. This works by including tests in the deployment and then looking at telnet
|
||||
for the test results.
|
||||
|
||||
Install necessary packages:
|
||||
|
||||
```bash
|
||||
sudo apt-get install nodejs npm
|
||||
```
|
||||
|
||||
Install [rooibos-cli](https://github.com/georgejecook/rooibos-cli):
|
||||
|
||||
```bash
|
||||
npm install -g rooibos-cli
|
||||
```
|
||||
|
||||
Deploy the application with tests:
|
||||
|
||||
```bash
|
||||
make test
|
||||
```
|
||||
|
||||
View test results:
|
||||
|
||||
```bash
|
||||
telnet ${ROKU_DEV_TARGET} 8085
|
||||
```
|
||||
|
||||
To exit telnet: `CTRL + ]` and then type `quit + ENTER`
|
||||
|
||||
### Committing
|
||||
|
||||
Before commiting your code, please run:
|
||||
|
9
Makefile
9
Makefile
@ -1,8 +1,6 @@
|
||||
|
||||
#########################################################################
|
||||
# Makefile Usage:
|
||||
# > make test ' run all tests
|
||||
# > make testFailures ' run all tests and show only failures
|
||||
#
|
||||
# 1) Make sure that you have the curl command line executable in your path
|
||||
# 2) Set the variable ROKU_DEV_TARGET in your environment to the IP
|
||||
@ -13,10 +11,8 @@
|
||||
|
||||
APPNAME = Jellyfin_Roku
|
||||
VERSION = 1.6.2
|
||||
ROKU_TEST_ID = 1
|
||||
ROKU_TEST_WAIT_DURATION = 5
|
||||
|
||||
ZIP_EXCLUDE= -x rooibos/**\* -x xml/* -x artwork/* -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* -x *.git* -x *.DS* -x *.pkg* -x dist/**\* -x out/**\*
|
||||
ZIP_EXCLUDE= -x xml/* -x artwork/* -x \*.pkg -x storeassets\* -x keys\* -x \*/.\* -x *.git* -x *.DS* -x *.pkg* -x dist/**\* -x out/**\*
|
||||
|
||||
include app.mk
|
||||
|
||||
@ -29,7 +25,4 @@ beta:
|
||||
release:
|
||||
$(MAKE) BUILD='release' package
|
||||
|
||||
test: prep_staging prep_tests remove install
|
||||
echo "Running tests"
|
||||
|
||||
deploy: prep_staging remove install
|
||||
|
7
app.mk
7
app.mk
@ -163,13 +163,6 @@ package: prep_staging
|
||||
|
||||
@echo "*** packaging $(APPNAME)-$(BUILD) complete ***"
|
||||
|
||||
prep_tests:
|
||||
@mkdir -p $(STAGINGREL)/components/tests/; \
|
||||
mkdir -p $(STAGINGREL)/source/tests/; \
|
||||
cp -r $(SOURCEREL)/tests/components/* $(STAGINGREL)/components/tests/;\
|
||||
cp -r $(SOURCEREL)/tests/source/* $(STAGINGREL)/source/tests/;\
|
||||
./node_modules/.bin/rooibos-cli i tests/.rooibosrc.json
|
||||
|
||||
prep_commit:
|
||||
npm run format
|
||||
npm ci
|
||||
|
6257
package-lock.json
generated
6257
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,13 +3,9 @@
|
||||
"version": "1.6.2",
|
||||
"description": "Roku app for Jellyfin media server",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rokucommunity/bslint": "0.7.5",
|
||||
"brighterscript": "0.61.1",
|
||||
"rooibos-cli": "1.4.0",
|
||||
"ropm": "0.10.10"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -1,9 +1,5 @@
|
||||
sub Main (args as dynamic) as void
|
||||
|
||||
' If the Rooibos files are included in deployment, run tests
|
||||
'bs:disable-next-line
|
||||
if type(Rooibos__Init) = "Function" then Rooibos__Init()
|
||||
|
||||
' The main function that runs when the application is launched.
|
||||
m.screen = CreateObject("roSGScreen")
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"testPath": "out/staging/source/tests/specs",
|
||||
"rootPath": "",
|
||||
"outputPath": "out/staging/source/tests/rooibos",
|
||||
"projectPath": "."
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component
|
||||
name="TestsScene"
|
||||
extends="Scene"
|
||||
xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd"
|
||||
>
|
||||
<interface>
|
||||
<function name="Rooibos_CreateTestNode" />
|
||||
</interface>
|
||||
|
||||
<script type="text/brightscript" uri="pkg:/source/tests/rooibos/rooibosDist.brs" />
|
||||
</component>
|
File diff suppressed because it is too large
Load Diff
@ -1,20 +0,0 @@
|
||||
'@TestSuite [GLT] Globals Tests
|
||||
|
||||
'@Setup
|
||||
function GLT_setup() as void
|
||||
|
||||
end function
|
||||
|
||||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
'@It tests the ability to use the globals getter/setter
|
||||
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
'@Test Global Getter and Setter
|
||||
'@Params["this", "that"]
|
||||
'@Params["somenumber", 2342342]
|
||||
function GLT__SetGetGlobals(key, value) as void
|
||||
setGlobal(key, value)
|
||||
m.assertEqual(getGlobal(key), value)
|
||||
end function
|
||||
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"logLevel": 4,
|
||||
"testsDirectory": "pkg:source/tests/specs",
|
||||
"failFast": false,
|
||||
"showOnlyFailures": false,
|
||||
"maxLinesWithoutSuiteDirective": 30,
|
||||
"supportLegacyTests": false
|
||||
}
|
Loading…
Reference in New Issue
Block a user