1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-26 04:00:43 +03:00

Began restructuring intest instructions

This commit is contained in:
Graham Nelson 2023-07-27 10:57:57 +01:00
parent db88b3da8d
commit e125085e42
11 changed files with 198 additions and 10 deletions

View file

@ -1,6 +1,6 @@
# Inform 7
[Version](notes/versioning.md): 10.2.0-beta+6W90 'Krypton' (24 July 2023)
[Version](notes/versioning.md): 10.2.0-beta+6W91 'Krypton' (27 July 2023)
## About Inform

View file

@ -1,3 +1,3 @@
Prerelease: beta
Build Date: 24 July 2023
Build Number: 6W90
Build Date: 27 July 2023
Build Number: 6W91

View file

@ -0,0 +1,180 @@
! This is Exemplary
set: $I6 = inform6/Tangled/inform6
set: $I7 = inform7/Tangled/inform7
set: $INTERNAL = inform7/Internal
set: $WORKSPACE = $$workspace
set: $ZINT = inform6/Tests/Assistants/dumb-frotz/dumb-frotz
set: $GINT = inform6/Tests/Assistants/dumb-glulx/glulxe/glulxe
set: $TOC = NO
set: $BASIC = NO
! First we decide whether to compile it for the Z-machine or Glulx.
set: $VM = Z
if: $FOR Glulx
set: $VM = G
endif
if: $FOR C
set: $VM = G
set: $TOC = YES
endif
if: $LANGUAGE Basic
set: $BASIC = YES
endif
! On the basis of which:
if: $VM G
set: $FORMAT = Inform6/32
set: $EXT = ulx
set: $I6OPTIONS = -E2SDwGx
set: $INT = $GINT
set: $INTNAME = dumb-glulxe
set: $INTOPTIONS = -u -q
else
set: $FORMAT = Inform6/16
set: $EXT = z8
set: $I6OPTIONS = -E2SDwv8x
set: $INT = $ZINT
set: $INTNAME = dumb-frotz
set: $INTOPTIONS = -w 1000
endif
! Now we extract the source text from whatever file originated the test
! case: this is a non-trivial operation when the file is an Extension or
! an example, but is a simple copy operation otherwise.
extract: $WORK/Example.inform/Source/story.ni $VM
mkdir: $WORK/Transient
step: find $WORK/Transient -mindepth 1 -delete
mkdir: $$workspace/Actuals
set: $EXTERNALS =
if: $$STDNEST %c+
set: $EXTERNALS = -external $$STDNEST
else
if: $NEST <none>
else
set: $EXTERNALS = -external $NEST
endif
endif
if: $CASE PM_Map%c*
set: $I7OPTIONS = -format=$FORMAT -no-progress -no-resource-checking -fixtime -rng -sigils -log nothing `$EXTERNALS -transient $WORK/Transient -no-census-update -internal $INTERNAL
else
if: $BASIC YES
set: $I7OPTIONS = -basic -format=$FORMAT -no-progress -no-resource-checking -fixtime -rng -sigils -log nothing `$EXTERNALS -transient $WORK/Transient -no-index -internal $INTERNAL
else
set: $I7OPTIONS = -format=$FORMAT -no-progress -no-resource-checking -fixtime -rng -sigils -log nothing `$EXTERNALS -transient $WORK/Transient -no-index -internal $INTERNAL
endif
endif
! First, problem message cases, where we require I7 to fail and with the
! correct output.
if: $TYPE problem
set: $A = $$workspace/Actuals/$CASE.txt
set: $I = $PATH/$CASE-I.txt
debugger: lldb -f $I7 -- `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform -crash-all
fail step: $I7 `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform >$A 2>&1
or: 'failed to produce its namesake Problem message' $A
show: $A
exists: $I
or: 'produced Problem(s), but no ideal transcript existed'
match problem: $A $I
or: 'produced the wrong Problem message(s)'
pass: 'passed'
endif
step: rm -f notebook.glkdata prefs.glkdata barbara.glkdata
! And then the general case.
set: $I7CONSOLE = $WORK/Example.inform/Build/i7_output.txt
if: $TOC YES
mkdir: $PATH/_Textual
mkdir: $PATH/_C
set: $I7CLIB = inform7/Internal/Miscellany
set: $TOUT = $PATH/_Textual/$CASE.intert
set: $COUT = $PATH/_C/$CASE.c
set: $OFILE = $WORK/Example.inform/Build/$CASE.o
step: $I7 -fixtime -rng -sigils -format=C $WORK/Example.inform/Source/story.ni -variable *tout=$TOUT -o $COUT >$I7CONSOLE 2>&1
or: 'failed with Problem message(s)' $I7CONSOLE
set: $CCCONSOLE = $WORK/Example.inform/Build/cc_output.txt
set: $LINKCONSOLE = $WORK/Example.inform/Build/link_output.txt
set: $STORYFILE = $WORK/Example.inform/Build/final$$EXESUFFIX
step: `$$CCOMPILER -o $OFILE $COUT -I $I7CLIB >$CCCONSOLE 2>&1
or: 'failed to compile C' $CCCONSOLE
step: `$$CLINKER -o $STORYFILE $OFILE `$$LINKFLAGS >$LINKCONSOLE 2>&1
or: 'failed to link C' $LINKCONSOLE
set: $A = $$workspace/Actuals/$CASE.txt
set: $I = $PATH/$CASE-I.txt
if: $BASIC YES
step: $STORYFILE >$A 2>&1
or: 'failed to run C program' $A
else
step: $STORYFILE <$SCRIPT >$A 2>&1
or: 'failed to run C program' $A
endif
show: $A
match text: $A $I
or: 'C program misbehaved'
step: rm -f notebook.glkdata prefs.glkdata barbara.glkdata
pass: 'passed'
else
debugger: lldb -f $I7 -- `$I7OPTIONS -format=$FORMAT -project $WORK/Example.inform -crash-all
step: $I7 `$I7OPTIONS -format=$FORMAT -project $WORK/Example.inform >$I7CONSOLE 2>&1
or: 'failed with Problem message(s)' $I7CONSOLE
show: $I7CONSOLE
set: $I6SOURCE = $WORK/Example.inform/Build/auto.inf
hash: $I6SOURCE $WORK/Example.inform/Build/checksum.txt
or: 'passed (matching cached I6 known to work)'
set: $I6CONSOLE = $WORK/Example.inform/Build/i6_output.txt
set: $STORYFILE = $WORK/Example.inform/Build/output.$EXT
step: $I6 `$I6OPTIONS $I6SOURCE $STORYFILE >$I6CONSOLE 2>&1
or: 'failed to pass through Inform 6' $I6CONSOLE
show i6: $I6CONSOLE
set: $A = $$workspace/Actuals/$CASE.txt
set: $I = $PATH/$CASE-I.txt
if: $BASIC YES
step: $INT `$INTOPTIONS $STORYFILE >$A 2>&1
or: 'unable to run $INTNAME (do you need to make interpreters?)'
else
step: $INT `$INTOPTIONS $STORYFILE <$SCRIPT >$A 2>&1
or: 'unable to run $INTNAME (do you need to make interpreters?)'
endif
exists: $I
or: 'translated successfully but no ideal transcript existed'
if: $VM G
match glulxe transcript: $A $I
or: 'played incorrectly'
else
match frotz transcript: $A $I
or: 'played incorrectly'
endif
step: rm -f notebook.glkdata prefs.glkdata barbara.glkdata
pass: 'passed'
endif

View file

@ -0,0 +1,4 @@
-possible-examples [Exemplary] '$$project/Documentation/Examples'
-possible-annotated-cases [Exemplary] '$$project/Documentation/Tests'
-recipe [Exemplary] '$$internal/Delia/Exemplary.delia'

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "Architecture16Kit",
"version": "10.2.0-beta+6W90"
"version": "10.2.0-beta+6W91"
},
"compatibility": "16-bit",
"kit-details": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "Architecture32Kit",
"version": "10.2.0-beta+6W90"
"version": "10.2.0-beta+6W91"
},
"compatibility": "32-bit",
"kit-details": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "BasicInformKit",
"version": "10.2.0-beta+6W90"
"version": "10.2.0-beta+6W91"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "CommandParserKit",
"version": "10.2.0-beta+6W90"
"version": "10.2.0-beta+6W91"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "EnglishLanguageKit",
"version": "10.2.0-beta+6W90"
"version": "10.2.0-beta+6W91"
},
"needs": [ {
"need": {

View file

@ -2,7 +2,7 @@
"is": {
"type": "kit",
"title": "WorldModelKit",
"version": "10.2.0-beta+6W90"
"version": "10.2.0-beta+6W91"
},
"needs": [ {
"need": {

View file

@ -17,6 +17,8 @@
-if linux -set LINKFLAGS '-lm -pthread'
-if linux -set MAKEFLAGS '-s --no-print-directory'
-set STDNEST inform7/Tests
-case [Diagnostics] 'inform7/Tests/GenerateDiagnostics-G.txt'
-cases [Main] 'inform7/Tests/Test Cases'
-if macos -cases [Release] 'inform7/Tests/Test Releases'
@ -24,7 +26,7 @@
-cases [Internal] 'inform7/Tests/Test Internals'
-cases [Make] 'inform7/Tests/Test Makes'
-cases [Filing] 'inform7/Tests/Test Filings'
-examples [Exemplary] resources/Documentation/Examples
-examples [ExemplaryDash] resources/Documentation/Examples
-problems [Main] 'inform7/Tests/Test Problems'
-singular temp
@ -33,6 +35,8 @@
-groups 'inform7/Tests/Groups'
-recipe [ExemplaryDash] '$$internal/Delia/Exemplary.delia'
-recipe [Main]
set: $I6 = inform6/Tangled/inform6