Skip to content
Snippets Groups Projects
  1. Jun 04, 2013
    • Nadav Har'El's avatar
      CLI: Allow running a single command non-interactively · 496d27f8
      Nadav Har'El authored
      Added the possibility to pass to cli.jar a command, which it runs instead
      of taking commands interactively. Note that the initialization script is
      run before the given command.
      
      After this patch,
      
              scripts/run.py -e "java.so -jar /java/cli.jar"
      
      Continues to run the interactive command line editor loop, as before.
      But additionally, one can do:
      
              scripts/run.py -e "java.so -jar /java/cli.jar ls"
      
      To run just the command "ls" and exit - exactly as if the user would type
      this command on the command line and exit the VM.
      
      The given command can be, of course, much longer. For example to run Jetty
      after the CLI's normal initialization script, the following monster can
      be used:
      
      scripts/run.py -n -e "java.so -jar /java/cli.jar java -classpath /jetty/* org.eclipse.jetty.xml.XmlConfiguration /jetty/jetty.xml"
      
      (Funny how a single command should say "java" 3 times and "jetty" 4 times :-))
      496d27f8
    • Nadav Har'El's avatar
      CLI: Add "java" command · 01cb7973
      Nadav Har'El authored
      Add a "java" command to the CLI, using the same syntax of java.so and
      attempting to emulate as closely as possible the "java" command on Linux.
      So for example one can run
      
              java Hello
      
      to run /java/Hello.class (/java is on the classpath by default), or
      
              java -jar /java/bench.jar
      
      to run the main class of this jar, or a more sophisticated
      command lines, such as the following which runs Jetty (if the
      appropriate files are in your image):
      
              java -classpath /jetty/* org.eclipse.jetty.xml.XmlConfiguration /jetty/jetty.xml
      
      Note that like java.so, the new "java" command basically runs the RunJava
      class (/java/RunJava.class). Remember that java.so adds /java to the parent
      class loader, so we can always find the RunJava class even though it's not
      in cli.jar or cloudius.jar).
      01cb7973
  2. Jun 03, 2013
  3. May 28, 2013
  4. May 19, 2013
  5. May 16, 2013
    • Nadav Har'El's avatar
      Default console to cooked mode, not raw mode. · cf74861e
      Nadav Har'El authored
      Until now, OSV's console defaulted to raw mode, to make the CLI
      happy. The problem is that on Linux, applications expect to be
      run in cooked mode, so if we ever run a simple application that
      tries to read user input, it can be confused.
      
      This patch makes OSV console default to cooked mode, and the
      CLI switch to raw mode before reading an input line - and reset
      to the default mode just before running the user's command.
      
      Unfortunately, we had to resort to adding a JNI class "Stty",
      since Java has no builtin support for the ioctls required for
      changing the tty settings.
      cf74861e
  6. May 14, 2013
  7. May 09, 2013
  8. May 08, 2013
    • Nadav Har'El's avatar
      com.cloudius.util.Exec.run() used to return main()'s exit code in a · 1fe04ab3
      Nadav Har'El authored
      class-static variable, which is not only strange, it also means we
      cannot concurrently run several programs in several threads.
      
      Change it so run() returns the (32-bit) return value, and when execution
      fails (e.g., file not found), it throws an IOException.
      
      Note that unlike Unix where main()'s return value is limited to 8 bits,
      here we decided to allow the full gamut (63-bit) of return values from
      main(). main() may return -23 or 2323813 and this does not indicate
      an error running it (only an exception indicates an error).
      
      This patch also removes the arbitrary limit of 256 command line arguments
      (not that anyone would need more...).
      1fe04ab3
    • Guy Zana's avatar
      java: use the new TestRunner class in the cli · efa797cc
      Guy Zana authored
      All Java tests need to implement the Test interface and be registered with
      TestRunner in order to be available to the test cli command.
      
      TCPEchoServerTest is no longer accessible from javascript, instead, TestRunner is
      now the interface of JS for running tests.
      efa797cc
  9. May 07, 2013
  10. Apr 30, 2013
    • Guy Zana's avatar
      cli: add a 'test' command · 06e423bd
      Guy Zana authored
      1. a simple command that invokes the run method of a test class
      2. supports autocomplete with test names
      06e423bd
  11. Apr 22, 2013
    • Guy Zana's avatar
      initial javascript CLI implementation · 39a80e71
      Guy Zana authored
      run a javascript CLI by default on boot.
      
      1. implements trivial versions of ls, cat, cd, pwd, help
      2. needs raw mode from the console, handles backspace and tab
      3. provide autocomplete support
      39a80e71
Loading