Skip to content

Instantly share code, notes, and snippets.

@mossheim
Last active July 27, 2017 16:35
Show Gist options
  • Save mossheim/ddfbf90c2bd8e178677d93f680c0f062 to your computer and use it in GitHub Desktop.
Save mossheim/ddfbf90c2bd8e178677d93f680c0f062 to your computer and use it in GitHub Desktop.
Complete test script for filesystem PR

User Test Checklist

1 Check that correct files & directories are made at startup & shutdown

  1. Clear userAppSupport, systemAppSupport directories
  2. Start SuperCollider (IDE)
  3. Files & folders should be:
    • downloaded-quarks (empty)
    • Help (help files)
    • HistoryLogs (empty)
    • sc_ide_conf.yaml
    • sessions (empty)
    • synthdefs (empty)
  4. Close the IDE
  5. Files & folders are the same except for
    • archive.sctxar

2 Check that all components boot (scsynth, scide, supernova, scdoc/help browser)

  1. Does the IDE boot?
  2. Does sclang boot after the IDE?
  3. Does the help browser boot after sclang?
  4. Can you navigate in the help browser?
  5. Code script:
3 + 4 // sclang basic execution
s.boot // booting scsynth
{SinOsc.ar(440, 0, 0.1) * Env.perc.kr(doneAction: Done.freeSelf)}.play // sound w scsynth
s.quit
Server.supernova // switch to supernova
s.boot // booting supernova
{SinOsc.ar(440, 0, 0.1) * Env.perc.kr(doneAction: Done.freeSelf)}.play // sound w supernova

3a (macOS) Behavior of aliases during compilation

Perform these steps all in order.

Compiling normal extensions

  1. Save this file in the Extensions folder:
// TestClass.sc
TestClass { *testMethod { ^5 } }
  1. Recompile the class library
  2. Can you run that method?

Compiling aliased extensions (duplicate class failure)

  1. Create an alias of the file from step 1 of the prevous test. The name should be TestClass.sc alias
  2. Recompile the class library
  3. Compilation should fail. Did it?

Compiling aliased extensions (success)

  1. Move the original TestClass.sc into the user app support directory (out of the compilation path)
  2. Delete the original alias, create a new alias of TestClass.sc, and move the new alias into the extensions folder.
  3. Recompile the class library
  4. Can you run the method?

Compiling with bad alias file

  1. Delete TestClass.sc.
  2. Recompile the class library
  3. You should get an error message that the 'target missing for alias'. Did you?
  4. The class library should still compile correctly. Did it?

Compiling aliased directory

  1. Delete the alias from previous tests.
  2. In the user app support dir, create the following:
    • TestFolder, a new folder
    • TestFolder/TestClass.sc, with the same contents as before
    • Extensions/TestFolder alias, an alias of TestFolder
  3. Recompile the class library
  4. Compilation should succeed, and you should be able to run the method. Did it, and can you?

Compiling with bad alias directory

  1. Delete TestFolder and its contents.
  2. Recompile the class library.
  3. You should get a 'target missing for alias' error. Did you?
  4. The class library should still compile successfully. Did it?

Cleanup

  1. Delete any leftover files or aliases in the user app support dir.

3b (POSIX) Compilation with symlinks

Compiling normal extensions

  1. Save this file in the Extensions folder:
// TestClass.sc
TestClass { *testMethod { ^5 } }
  1. Recompile the class library.
  2. Can you run that method?

Compiling symlinked extensions (same folder)

  1. cd into the extensions directory and:
ln -s TestClass.sc TestClass_link
  1. Recompile the class library.
  2. Compilation should succeed. Did it?
  3. You should be able to run the test method. Can you?

Compiling symlinked extensions (broken symlink)

  1. Now:
mv TestClass.sc ..
  1. Recompile the class library.
  2. Compilation should succeed with no error or warning. Did it? Note: The new behavior is to print an error message: ERROR: Could not iterate on '/home/aÖßæ/.local/share/SuperCollider/Extensions/TestClass_link': No such file or directory. I think this is reasonable. Compilation should still succeed.
  3. You should not be able to run the test method. Can you?

Compiling symlinked extensions (out of folder)

  1. Now, remove the older symlink, and add a new one pointing at moved extension file.
rm TestClass_link
ln -s ../TestClass.sc TestClass_link
  1. Recompile the class library.
  2. Compilation should succeed with no error or warning. Did it?
  3. You should not be able to run the test method. Can you?

4 Check that Quarks work correctly

  1. Run
Quarks.gui
  1. Does the GUI load?
  2. Try to install a Quark, such as BandSplitter.
  3. Do you get an "Installed Quark: BandSplitter[1.0.0]" message?
  4. Check that the downloaded-quarks folder now contains quarks and BandSplitter
  5. Check that the user app support dir now contains sclang_conf.yaml with these contents:
includePaths:
-   /Users/<USER'S NAME>/Library/Application Support/SuperCollider/downloaded-quarks/BandSplitter
excludePaths:
[]
postInlineWarnings: false
  1. Close the Quarks GUI, and recompile the class library.
  2. Do you now have access to the BandSplitter class? (Or the resources of whatever you downloaded?)

5 Install and check sc3-plugins

  1. Download sc3-plugins.
  2. Unzip and move into /Extensions
  3. Recompile the class library.
  4. Can you execute the following code? (scsynth)
s.boot
{CrossoverDistortion.ar(SinOsc.ar(440), 0.5, 0.5, 0.1)}.play
  1. Change the folder name for DistortionUGens to something with a non-ASCII character in it.
  2. Recompile the class library.
  3. Can you still execute the above code?

6 Check test script

  1. Download the test script.
  2. Run it and confirm that all operations succeed.
  3. Run it again, commenting out lines that delete files, to confirm that files are created with the correctly encoded names.
  4. Remember to check sclang_conf.yaml

7 String.standardizePath : conform to old behavior

Confirm that the following script produces accurate results. These results are basically the same between Windows and macOS. POSIX systems are probably also similar.

"~,~/,/~/,~~,~~/,~/~".split( $, ).do { |x|
  "%: %\n".postf( x.padRight(8), x.standardizePath );
};

// ~       : ~
// ~/      : /Users/<USER'S NAME>/
// /~/     : /~/
// ~~      : ~~
// ~~/     : ~~/
// ~/~     : /Users/<USER'S NAME>/~

8 String.pathMatch : conform to old behavior

Confirm that the following script produces accurate results. Note that you may get differences for "*", "*/", etc. Check it against what File.getcwd returns. For the test below, mine was: /Users/brianheim/git/supercollider/build/editors/sc-ide/Debug

(
~path = Platform.userHomeDir +/+ "";
~simplePaths = (thisProcess.platform.name === \windows).if {
	",/,*,C:/,C:\\,C://,C:\\\\,C:/*,C:/*/,C:/*,C:/*/,C:/*e*,C:/*e*/*,C:/*/*,????,C:/?,C:/????,C:/*????,C:/users/,C:/Users/,C:/Users*/,C:/A*/,C:/[ABC]*".split( $, );
} {
    ",/,//,*,*/,/*,/*/,/*e*,/*e*/*,/*/*,????,/????,/*????,/users/,/Users/,/Users*/,/[abc]*/".split( $, );
};
~userPaths = ",*,/,*/,???,D*,D*/*.*".split( $, ).collect( ~path ++ _ );
~relativePaths = (thisProcess.platform.name === \windows).if {
    ".,..,C:/.,C:/..,C:/*/..,C:/*/.,C:/*/./*,C:/*/../*".split( $, );
} {
    ".,..,/.,/..,/*/..,/*/.,/*/./*,/*/../*".split( $, );
};

~allPaths = ~simplePaths ++ ~userPaths ++ ~relativePaths;

~allPaths.do { |x|
    "%: %\n".postf( x.padRight(30), x.pathMatch )
};
)

Behavior on macOS (posix system)

Check that the results are the same (not verbatim, but that all the path components like trailing slashes etc. are identical):

                              : [  ]
/                             : [ / ]
//                            : [ // ]
*                             : [ SuperCollider.app/ ]
*/                            : [ SuperCollider.app/ ]
/*                            : [ /Applications/, /Library/, /Network/, /System/, /Users/, /Volumes/, /bin/, /cores/, /dev/, /etc/, /home/, /installer.failurerequests, /net/, /opt/, /private/, /sbin/, /tmp/, /usr/, /var/ ]
/*/                           : [ /Applications/, /Library/, /Network/, /System/, /Users/, /Volumes/, /bin/, /cores/, /dev/, /etc/, /home/, /net/, /opt/, /private/, /sbin/, /tmp/, /usr/, /var/ ]
/*e*                          : [ /Network/, /System/, /Users/, /Volumes/, /cores/, /dev/, /etc/, /home/, /installer.failurerequests, /net/, /private/ ]
/*e*/*                        : [ /System/Library/, /Users/Shared/, /Users/brianheim/, /Volumes/Macintosh HD/, /dev/afsc_type5, /dev/auditpipe, /dev/auditsessions, /dev/autofs, /dev/autofs_control, /dev/autofs_homedirmounter, /dev/autofs_notrigger, /dev/autofs_nowait, /dev/bpf0, /dev/bpf1, /dev/bpf2, /dev/bpf3, /dev/bpf4, /dev/console, /dev/cu.Bluetooth-Incoming-Port, /dev/cu.RNBT-7DCE-RNI-SPP, /dev/disk0, /dev/disk0s1, /dev/disk0s2, /dev/disk0s3, /dev/disk1, /dev/disk2, /dev/disk2s1, /dev/disk2s2, /dev/disk3, /dev/disk3s1, /dev/disk3s2, ...etc...
/*/*                          : [ /Applications/Ableton Live 9 Suite.app/, /Applications/Adobe Acrobat DC/, /Applications/Adobe Creative Cloud/, /Applications/Adobe Experience Design CC (Beta)/, /Applications/Adobe Illustrator CC 2017/, /Applications/Adobe InDesign CC 2017/, /Applications/Adobe Photoshop CC 2017/, /Applications/Android Studio.app/, /Applications/App Store.app/, /Applications/Appium.app/, /Applications/Arduino.app/, /Applications/Atom.app/, /Applications/Audacity/, /Applications/Automator.app/, /Applications/BSNES.app/, /A...etc...
????                          : [  ]
/????                         : [ /home/, /sbin/ ]
/*????                        : [ /Applications/, /Library/, /Network/, /System/, /Users/, /Volumes/, /cores/, /home/, /installer.failurerequests, /private/, /sbin/ ]
/users/                       : [ /users/ ]
/Users/                       : [ /Users/ ]
/Users*/                      : [ /Users/ ]
/[abc]*/                      : [ /bin/, /cores/ ]
/Users/brianheim/             : [ /Users/brianheim/ ]
/Users/brianheim/*            : [ /Users/brianheim/Applications/, /Users/brianheim/Box Sync/, /Users/brianheim/CLionProjects/, /Users/brianheim/Creative Cloud Files/, /Users/brianheim/Desktop/, /Users/brianheim/Documents/, /Users/brianheim/Downloads/, /Users/brianheim/Dropbox (Love Local Design)/, /Users/brianheim/Dropbox (Personal)/, /Users/brianheim/Dropbox/, /Users/brianheim/Library/, /Users/brianheim/Movies/, /Users/brianheim/Music/, /Users/brianheim/Pictures/, /Users/brianheim/Public/, /Users/brianheim/bin/, /Users/brianheim/cpp/, /U...etc...
/Users/brianheim//            : [ /Users/brianheim// ]
/Users/brianheim/*/           : [ /Users/brianheim/Applications/, /Users/brianheim/Box Sync/, /Users/brianheim/CLionProjects/, /Users/brianheim/Creative Cloud Files/, /Users/brianheim/Desktop/, /Users/brianheim/Documents/, /Users/brianheim/Downloads/, /Users/brianheim/Dropbox (Love Local Design)/, /Users/brianheim/Dropbox (Personal)/, /Users/brianheim/Dropbox/, /Users/brianheim/Library/, /Users/brianheim/Movies/, /Users/brianheim/Music/, /Users/brianheim/Pictures/, /Users/brianheim/Public/, /Users/brianheim/bin/, /Users/brianheim/cpp/, /U...etc...
/Users/brianheim/???          : [ /Users/brianheim/bin/, /Users/brianheim/cpp/, /Users/brianheim/ftp/, /Users/brianheim/git/, /Users/brianheim/php/ ]
/Users/brianheim/D*           : [ /Users/brianheim/Desktop/, /Users/brianheim/Documents/, /Users/brianheim/Downloads/, /Users/brianheim/Dropbox (Love Local Design)/, /Users/brianheim/Dropbox (Personal)/, /Users/brianheim/Dropbox/ ]
/Users/brianheim/D*/*.*       : [ /Users/brianheim/Desktop/Ableton.Live.Suite.9.6.x64.MAC/, /Users/brianheim/Desktop/Screen Shot 2017-07-12 at 10.58.12 AM.png, /Users/brianheim/Desktop/Screen Shot 2017-07-12 at 3.14.13 PM.png, /Users/brianheim/Desktop/Screen Shot 2017-07-15 at 3.18.47 PM.png, /Users/brianheim/Documents/Kirby's Dream Course (USA).frz, /Users/brianheim/Documents/notez.nktrl2_data, /Users/brianheim/Documents/pearl_main.dst, /Users/brianheim/Documents/typical.nktrl2_data, /Users/brianheim/Downloads/64-ia-32-architectures-soft...etc...
.                             : [ ./ ]
..                            : [ ../ ]
/.                            : [ /./ ]
/..                           : [ /../ ]
/*/..                         : [ /Applications/../, /Library/../, /Network/../, /System/../, /Users/../, /Volumes/../, /bin/../, /cores/../, /dev/../, /etc/../, /home/../, /net/../, /opt/../, /private/../, /sbin/../, /tmp/../, /usr/../, /var/../ ]
/*/.                          : [ /Applications/./, /Library/./, /Network/./, /System/./, /Users/./, /Volumes/./, /bin/./, /cores/./, /dev/./, /etc/./, /home/./, /net/./, /opt/./, /private/./, /sbin/./, /tmp/./, /usr/./, /var/./ ]
/*/./*                        : [ /Applications/./Ableton Live 9 Suite.app/, /Applications/./Adobe Acrobat DC/, /Applications/./Adobe Creative Cloud/, /Applications/./Adobe Experience Design CC (Beta)/, /Applications/./Adobe Illustrator CC 2017/, /Applications/./Adobe InDesign CC 2017/, /Applications/./Adobe Photoshop CC 2017/, /Applications/./Android Studio.app/, /Applications/./App Store.app/, /Applications/./Appium.app/, /Applications/./Arduino.app/, /Applications/./Atom.app/, /Applications/./Audacity/, /Applications/./Automator.app/, ...etc...
/*/../*                       : [ /Applications/../Applications/, /Applications/../Library/, /Applications/../Network/, /Applications/../System/, /Applications/../Users/, /Applications/../Volumes/, /Applications/../bin/, /Applications/../cores/, /Applications/../dev/, /Applications/../etc/, /Applications/../home/, /Applications/../installer.failurerequests, /Applications/../net/, /Applications/../opt/, /Applications/../private/, /Applications/../sbin/, /Applications/../tmp/, /Applications/../usr/, /Applications/../var/, /Library/../Applic...etc...

Behavior on Windows

                              : [  ]
/                             : [  ]
*                             : [ AUTHORS, bearer\, CHANGELOG.md, COPYING, examples\, generic\, HelpSource\, HID_Support\, icudt54.dll, icuin54.dll, icuuc54.dll, imageformats\, libfftw3f-3.dll, libsndfile-1.dll, msvcp120.dll, msvcr120.dll, platforms\, plugins\, printsupport\, Qt5Core.dll, Qt5Cored.dll, Qt5Gui.dll, Qt5Guid.dll, Qt5Multimedia.dll, Qt5Multimediad.dll, Qt5MultimediaWidgets.dll, Qt5MultimediaWidgetsd.dll, Qt5Network.dll, Qt5Networkd.dll, Qt5OpenGL.dll, Qt5OpenGLd.dll, Qt5Positioning.dll, Qt5Positioningd.dll, Qt5PrintSupport.dl...etc...
C:/                           : [ SuperCollider\ ]
C:\                           : [ SuperCollider\ ]
C://                          : [  ]
C:\\                          : [  ]
C:/*                          : [ C:\$Recycle.Bin\, C:\AppleBcInstaller.log, C:\archive.sctxar, C:\bootmgr, C:\BOOTNXT, C:\Documents and Settings\, C:\Intel\, C:\local\, C:\MinGW\, C:\msys64\, C:\pagefile.sys, C:\PerfLogs\, C:\Program Files\, C:\Program Files (x86)\, C:\ProgramData\, C:\Qt\, C:\Recovery\, C:\swapfile.sys, C:\System Volume Information\, C:\Users\, C:\Windows\ ]
C:/*/                         : [ C:\$Recycle.Bin\, C:\AppleBcInstaller.log, C:\archive.sctxar, C:\bootmgr, C:\BOOTNXT, C:\Documents and Settings\, C:\Intel\, C:\local\, C:\MinGW\, C:\msys64\, C:\pagefile.sys, C:\PerfLogs\, C:\Program Files\, C:\Program Files (x86)\, C:\ProgramData\, C:\Qt\, C:\Recovery\, C:\swapfile.sys, C:\System Volume Information\, C:\Users\, C:\Windows\ ]
C:/*                          : [ C:\$Recycle.Bin\, C:\AppleBcInstaller.log, C:\archive.sctxar, C:\bootmgr, C:\BOOTNXT, C:\Documents and Settings\, C:\Intel\, C:\local\, C:\MinGW\, C:\msys64\, C:\pagefile.sys, C:\PerfLogs\, C:\Program Files\, C:\Program Files (x86)\, C:\ProgramData\, C:\Qt\, C:\Recovery\, C:\swapfile.sys, C:\System Volume Information\, C:\Users\, C:\Windows\ ]
C:/*/                         : [ C:\$Recycle.Bin\, C:\AppleBcInstaller.log, C:\archive.sctxar, C:\bootmgr, C:\BOOTNXT, C:\Documents and Settings\, C:\Intel\, C:\local\, C:\MinGW\, C:\msys64\, C:\pagefile.sys, C:\PerfLogs\, C:\Program Files\, C:\Program Files (x86)\, C:\ProgramData\, C:\Qt\, C:\Recovery\, C:\swapfile.sys, C:\System Volume Information\, C:\Users\, C:\Windows\ ]
C:/*e*                        : [ C:\$Recycle.Bin\, C:\AppleBcInstaller.log, C:\archive.sctxar, C:\Documents and Settings\, C:\Intel\, C:\pagefile.sys, C:\PerfLogs\, C:\Program Files\, C:\Program Files (x86)\, C:\Recovery\, C:\swapfile.sys, C:\System Volume Information\, C:\Users\ ]
C:/*e*/*                      : [  ]
C:/*/*                        : [  ]
????                          : [  ]
C:/?                          : [  ]
C:/????                       : [ C:\Qt\ ]
C:/*????                      : [ C:\$Recycle.Bin\, C:\AppleBcInstaller.log, C:\archive.sctxar, C:\bootmgr, C:\BOOTNXT, C:\Documents and Settings\, C:\Intel\, C:\local\, C:\MinGW\, C:\msys64\, C:\pagefile.sys, C:\PerfLogs\, C:\Program Files\, C:\Program Files (x86)\, C:\ProgramData\, C:\Qt\, C:\Recovery\, C:\swapfile.sys, C:\System Volume Information\, C:\Users\, C:\Windows\ ]
C:/users/                     : [ C:\Users\ ]
C:/Users/                     : [ C:\Users\ ]
C:/Users*/                    : [ C:\Users\ ]
C:/A*/                        : [ C:\AppleBcInstaller.log, C:\archive.sctxar ]
C:/[ABC]*                     : [  ]
C:\Users\brianheim\           : [ C:\Users\brianheim\ ]
C:\Users\brianheim\*          : [ C:\Users\brianheim\..gitconfig.un~, C:\Users\brianheim\.gitconfig, C:\Users\brianheim\.gitconfig~, C:\Users\brianheim\.gitignore_global, C:\Users\brianheim\.viminfo, C:\Users\brianheim\._vimrc.un~, C:\Users\brianheim\AppData\, C:\Users\brianheim\Application Data\, C:\Users\brianheim\Contacts\, C:\Users\brianheim\Cookies\, C:\Users\brianheim\Desktop\, C:\Users\brianheim\dev\, C:\Users\brianheim\Documents\, C:\Users\brianheim\Downloads\, C:\Users\brianheim\Favorites\, C:\Users\brianheim\git\, C:\Users\brian...etc...
C:\Users\brianheim\/          : [  ]
C:\Users\brianheim\*/         : [ C:\Users\brianheim\..gitconfig.un~, C:\Users\brianheim\.gitconfig, C:\Users\brianheim\.gitconfig~, C:\Users\brianheim\.gitignore_global, C:\Users\brianheim\.viminfo, C:\Users\brianheim\._vimrc.un~, C:\Users\brianheim\AppData\, C:\Users\brianheim\Application Data\, C:\Users\brianheim\Contacts\, C:\Users\brianheim\Cookies\, C:\Users\brianheim\Desktop\, C:\Users\brianheim\dev\, C:\Users\brianheim\Documents\, C:\Users\brianheim\Downloads\, C:\Users\brianheim\Favorites\, C:\Users\brianheim\git\, C:\Users\brian...etc...
C:\Users\brianheim\???        : [ C:\Users\brianheim\dev\, C:\Users\brianheim\git\ ]
C:\Users\brianheim\D*         : [ C:\Users\brianheim\Desktop\, C:\Users\brianheim\dev\, C:\Users\brianheim\Documents\, C:\Users\brianheim\Downloads\ ]
C:\Users\brianheim\D*/*.*     : [  ]
.                             : [ SuperCollider\ ]
..                            : [ Install\ ]
C:/.                          : [  ]
C:/..                         : [  ]
C:/*/..                       : [  ]
C:/*/.                        : [ C:\*\bootmgr, C:\*\BOOTNXT, C:\*\Documents and Settings\, C:\*\Intel\, C:\*\local\, C:\*\MinGW\, C:\*\msys64\, C:\*\PerfLogs\, C:\*\Program Files\, C:\*\Program Files (x86)\, C:\*\ProgramData\, C:\*\Qt\, C:\*\Recovery\, C:\*\System Volume Information\, C:\*\Users\, C:\*\Windows\ ]
C:/*/./*                      : [  ]
C:/*/../*                     : [ C:\*\..\$Recycle.Bin\, C:\*\..\AppleBcInstaller.log, C:\*\..\archive.sctxar, C:\*\..\bootmgr, C:\*\..\BOOTNXT, C:\*\..\Documents and Settings\, C:\*\..\Intel\, C:\*\..\local\, C:\*\..\MinGW\, C:\*\..\msys64\, C:\*\..\pagefile.sys, C:\*\..\PerfLogs\, C:\*\..\Program Files\, C:\*\..\Program Files (x86)\, C:\*\..\ProgramData\, C:\*\..\Qt\, C:\*\..\Recovery\, C:\*\..\swapfile.sys, C:\*\..\System Volume Information\, C:\*\..\Users\, C:\*\..\Windows\ ]

10 Sessions

  1. Boot the IDE
  2. Create & save a few files
  3. Save the session
  4. Close the IDE
  5. Check that your session appears in the sessions folder
  6. Close the IDE, reopen, and confirm that your session loaded properly.

11 History logs

  1. Execute
History.start
  1. Did the post window indicate success?
  2. Was a new log_History file created in HistoryLogs?
  3. Execute
3+4
History.end
  1. Did that work in the post window?
  2. Check that the log file in HistoryLogs has been updated.

12 SynthDefs

  1. Boot the server. Make a note of the number of loaded defs.
  2. Execute
s.boot
SynthDef(\my_test_synthdef, { Out.ar(0, SinOsc.ar!2) }).store
  1. Check the synthdefs folder. Did the file get written?
  2. Was the file also sent to the server? (Did the def-count increase by 1?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment