Skip to content
This repository has been archived by the owner on Feb 27, 2019. It is now read-only.

Homework #1 #2

Open
saucisson opened this issue Oct 5, 2017 · 4 comments
Open

Homework #1 #2

saucisson opened this issue Oct 5, 2017 · 4 comments

Comments

@saucisson
Copy link

Homework #1 has been released. Deadline is 11 october 2017 at 23:59.
Look at the course homepage for more information.

@partizanos
Copy link

partizanos commented Oct 8, 2017

I am not sure what it he busted command supposed to outpout
whtn i run luacheck src I see the tests OK satus .

But with the busted src command I get this logs:

Error → ./graph/coverability_spec.lua @ 2
suite ./graph/coverability_spec.lua
./graph/coverability_spec.lua:2: module 'graph' not found:No LuaRocks module found for graph
	no field package.preload['graph']
	no file './src/graph.lua'
	no file './src/graph/graph.lua'
	no file './src/graph/init.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/graph.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/graph/init.lua'
	no file '/home/dimitris/.local/share/lua/5.3/graph.lua'
	no file '/home/dimitris/.local/share/lua/5.3/graph/init.lua'
	no file './graph.lua'
	no file './csrc/graph.so'
	no file './csrc/graph/graph.so'
	no file '/home/dimitris/.luarocks/lib/lua/5.3/graph.so'
	no file '/home/dimitris/.local/lib/lua/5.3/graph.so'
	no file '/home/dimitris/.local/lib/lua/5.3/loadall.so'
	no file './graph.so'

Error → ./graph/reachability_spec.lua @ 2
suite ./graph/reachability_spec.lua
./graph/reachability_spec.lua:2: module 'petrinet' not found:No LuaRocks module found for petrinet
	no field package.preload['petrinet']
	no file './src/petrinet.lua'
	no file './src/petrinet/petrinet.lua'
	no file './src/petrinet/init.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/petrinet.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/petrinet/init.lua'
	no file '/home/dimitris/.local/share/lua/5.3/petrinet.lua'
	no file '/home/dimitris/.local/share/lua/5.3/petrinet/init.lua'
	no file './petrinet.lua'
	no file './csrc/petrinet.so'
	no file './csrc/petrinet/petrinet.so'
	no file '/home/dimitris/.luarocks/lib/lua/5.3/petrinet.so'
	no file '/home/dimitris/.local/lib/lua/5.3/petrinet.so'
	no file '/home/dimitris/.local/lib/lua/5.3/loadall.so'
	no file './petrinet.so'

Error → ./marking/init_spec.lua @ 2
suite ./marking/init_spec.lua
./marking/init_spec.lua:2: module 'petrinet' not found:No LuaRocks module found for petrinet
	no field package.preload['petrinet']
	no file './src/petrinet.lua'
	no file './src/petrinet/petrinet.lua'
	no file './src/petrinet/init.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/petrinet.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/petrinet/init.lua'
	no file '/home/dimitris/.local/share/lua/5.3/petrinet.lua'
	no file '/home/dimitris/.local/share/lua/5.3/petrinet/init.lua'
	no file './petrinet.lua'
	no file './csrc/petrinet.so'
	no file './csrc/petrinet/petrinet.so'
	no file '/home/dimitris/.luarocks/lib/lua/5.3/petrinet.so'
	no file '/home/dimitris/.local/lib/lua/5.3/petrinet.so'
	no file '/home/dimitris/.local/lib/lua/5.3/loadall.so'
	no file './petrinet.so'

Error → ./petrinet/init_spec.lua @ 3
suite ./petrinet/init_spec.lua
./petrinet/init_spec.lua:3: module 'petrinet' not found:No LuaRocks module found for petrinet
	no field package.preload['petrinet']
	no file './src/petrinet.lua'
	no file './src/petrinet/petrinet.lua'
	no file './src/petrinet/init.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/petrinet.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/petrinet/init.lua'
	no file '/home/dimitris/.local/share/lua/5.3/petrinet.lua'
	no file '/home/dimitris/.local/share/lua/5.3/petrinet/init.lua'
	no file './petrinet.lua'
	no file './csrc/petrinet.so'
	no file './csrc/petrinet/petrinet.so'
	no file '/home/dimitris/.luarocks/lib/lua/5.3/petrinet.so'
	no file '/home/dimitris/.local/lib/lua/5.3/petrinet.so'
	no file '/home/dimitris/.local/lib/lua/5.3/loadall.so'
	no file './petrinet.so'

Error → ./state/init_spec.lua @ 2
suite ./state/init_spec.lua
./state/init_spec.lua:2: module 'state' not found:No LuaRocks module found for state
	no field package.preload['state']
	no file './src/state.lua'
	no file './src/state/state.lua'
	no file './src/state/init.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/state.lua'
	no file '/home/dimitris/.luarocks/share/lua/5.3/state/init.lua'
	no file '/home/dimitris/.local/share/lua/5.3/state.lua'
	no file '/home/dimitris/.local/share/lua/5.3/state/init.lua'
	no file './state.lua'
	no file './csrc/state.so'
	no file './csrc/state/state.so'
	no file '/home/dimitris/.luarocks/lib/lua/5.3/state.so'
	no file '/home/dimitris/.local/lib/lua/5.3/state.so'
	no file '/home/dimitris/.local/lib/lua/5.3/loadall.so'
	no file './state.so'
```
`
Any ideas?

@saucisson
Copy link
Author

saucisson commented Oct 8, 2017

In what directory do you run the luacheck and busted commands? What are the arguments that you give to these commands?

They should be run within the homework/petrinets directory, not the homework/petrinets/src one.

@sergentd
Copy link

Impossible de lancer l'exécution des fichiers .lua autrement qu'avec la commande "busted"
->Exemple d'erreur : module "petrinet" not found [...] in function "require"

@saucisson
Copy link
Author

You need to set the LUA_PATH variable correctly. Adding this line to the .bashrc or .bash_profile should work:

export LUA_PATH="./src/?.lua;${LUA_PATH}"

@saucisson saucisson mentioned this issue Oct 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants