extensions.st
branchrefactoring-vmdata
changeset 2008 c348b894fbfe
parent 1987 596f7d5cb7cd
child 2019 e1291a81f215
equal deleted inserted replaced
2002:ef3da336a6c9 2008:c348b894fbfe
  1805     "
  1805     "
  1806 
  1806 
  1807     "Created: / 27-07-2012 / 10:02:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1807     "Created: / 27-07-2012 / 10:02:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1808 ! !
  1808 ! !
  1809 
  1809 
  1810 !UserPreferences methodsFor:'accessing-java-devel'!
       
  1811 
       
  1812 javaTestsDirectory
       
  1813     ^ self at: #javaTestsDirectory
       
  1814 	ifAbsent:
       
  1815 	    [ | nm |
       
  1816 
       
  1817 	    nm := OperatingSystem getLoginName.
       
  1818 	     "Default path for Jan"
       
  1819 	    (nm = 'jv' and:[OperatingSystem isUNIXlike])
       
  1820 		ifTrue:
       
  1821 		    [ '/home/jv/Projects/libjava/sources/libjava/branches/jk_new_structure/tests' ]
       
  1822 		ifFalse:
       
  1823 		    [ "Default path for Jan (the other one :-)"
       
  1824 		    nm = 'jk'
       
  1825 			ifTrue: [ 'path for Jan' ]
       
  1826 			ifFalse:
       
  1827 			    [ "Default path for Marcel"
       
  1828 			    nm = 'm'
       
  1829 				ifTrue: [ '/home/m/Projects/libjava/branches/jk_new_structure/tests' ]
       
  1830 				ifFalse:
       
  1831 				    [ | "Look into package dir" p |
       
  1832 
       
  1833 				    (p := (Smalltalk getPackageDirectoryForPackage: 'stx:libjava') asFilename
       
  1834 						/ 'tests') exists
       
  1835 					ifTrue: [ p pathName ]
       
  1836 					ifFalse:
       
  1837 					    [ | "Try the environment variable (used by Hudson)" p |
       
  1838 
       
  1839 					    (p := OperatingSystem getEnvironment: 'LIBJAVA_TESTS') notNil
       
  1840 						ifTrue: [ p ]
       
  1841 						ifFalse:
       
  1842 						    [ "No default, trigger an error"
       
  1843 						    self error: 'No tests path specified' ] ] ] ] ] ]
       
  1844 
       
  1845     "
       
  1846 	UserPreferences current javaTestsDirectory"
       
  1847 
       
  1848     "Created: / 07-05-2011 / 17:43:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  1849     "Modified: / 07-05-2011 / 20:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  1850     "Modified: / 12-05-2011 / 15:54:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
       
  1851 ! !
       
  1852 
       
  1853 !UserPreferences methodsFor:'accessing-java-devel'!
       
  1854 
       
  1855 javaTestsDirectory: aStringOrFilename
       
  1856 
       
  1857     self at:#javaTestsDirectory put: aStringOrFilename asString.
       
  1858 
       
  1859     "Created: / 07-05-2011 / 17:45:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  1860 ! !
       
  1861 
       
  1862 !WordArray class methodsFor:'testing'!
  1810 !WordArray class methodsFor:'testing'!
  1863 
  1811 
  1864 isInterface
  1812 isInterface
  1865 
  1813 
  1866     ^false
  1814     ^false