feat: Add basic struture for tests
This commit is contained in:
		
							
								
								
									
										31
									
								
								.dev/run.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										31
									
								
								.dev/run.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| #!/bin/bash | ||||
| # script para iniciar entorno vivo | ||||
|  | ||||
|  | ||||
| SCRIPT_DIR=$(dirname `realpath $0`) | ||||
|  | ||||
| die() { | ||||
|     echo $1 | ||||
|     exit 1 | ||||
| } | ||||
|  | ||||
| [ ! -d "$SRC" ] && die "no se ubica ruta en SRC" | ||||
| [ -z "$DB_NAME" ] && die "se requiere variable DB_NAME" | ||||
|  | ||||
| set -e | ||||
|  | ||||
| # instalar modulo | ||||
| source ${SCRIPT_DIR}/install_module.sh | ||||
|  | ||||
| # inicializar base de datos | ||||
| # https://docs.tryton.org/projects/server/en/latest/tutorial/module/setup_database.html | ||||
| yes admin | trytond-admin -d ${DB_NAME} --all --act  | ||||
|  | ||||
|  | ||||
| # ejecutar servidor | ||||
| export SCRIPT_DIR | ||||
| export MODULES=$module_names | ||||
| export DB_NAME | ||||
| export SRC | ||||
|  | ||||
| honcho -d ${SCRIPT_DIR} start | ||||
		Reference in New Issue
	
	Block a user