<div dir="ltr">Bună, Andreea!<div><br></div><div>În toate cele 3 teste care pică este folosit operatorul pipe '|'. Ai încercat să rulezi o comandă care folosește pipe în mini-shell-ul tău? Funcționează corect?</div><div><br></div><div>Numai bine,</div><div>Răzvan<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 4, 2017 at 10:56 AM Andreea Dobroteanu <<a href="mailto:andreea.dobroteanu@gmail.com">andreea.dobroteanu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg">Buna, </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Spre exemplu, output-ul pentru testul 10, ruland checker-ul, este:</div><div class="gmail_msg">128</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg">1</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg">1</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg">1</div><div class="gmail_msg">3</div><div class="gmail_msg">3</div><div class="gmail_msg">1</div><div class="gmail_msg">3</div><div class="gmail_msg">3</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg">1</div><div class="gmail_msg">2</div><div class="gmail_msg">2</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">"Checker-ul" improvizat de mine arata cam asa: </div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">#!/bin/bash</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">rm -rf "test_outputs"</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">MAIN_TEST_DIR="test_outputs"</div><div class="gmail_msg">INPUT_DIR="_test/inputs"</div><div class="gmail_msg">TEST_TIMEOUT=30</div><div class="gmail_msg">BUFFERING_WRAPPER=""</div><div class="gmail_msg">LOG_FILE="/dev/null"</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">function execute_cmd {</div><div class="gmail_msg"> EXEC=$1</div><div class="gmail_msg"> INPUT=$2</div><div class="gmail_msg"> OUTPUT=$3</div><div class="gmail_msg"> mkdir -p "$MAIN_TEST_DIR/$OUTPUT" && cd "$MAIN_TEST_DIR/$OUTPUT" &> $LOG_FILE</div><div class="gmail_msg"> timeout $TEST_TIMEOUT $BUFFERING_WRAPPER $EXEC < "${INPUT}"</div><div class="gmail_msg"> sync</div><div class="gmail_msg"> cd - &> $LOG_FILE</div><div class="gmail_msg">}</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_01.lin.txt" "test_01_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_02.lin.txt" "test_02_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_03.txt" "test_03_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_04.lin.txt" "test_04_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_05.txt" "test_05_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_06.txt" "test_06_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_07.lin.txt" "test_07_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_08.txt" "test_08_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_09.txt" "test_09_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_10.txt" "test_10_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_11.txt" "test_11_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_12.txt" "test_12_out" > $LOG_FILE</div><div class="gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_13.txt" "test_13_out" > $LOG_FILE</div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Iar cu asta, output-ul obtinut in "test_outputs/test_10_out" este <b class="gmail_msg">3 </b>(rezultatul difera din cauza contextului diferit in care am rulat).</div><div class="gmail_msg">Daca rulez <b class="gmail_msg">../../../mini-shell < ../../inputs/test_10.txt</b> in <b class="gmail_msg">_test/outputs/test_10_out, </b>obtin <b class="gmail_msg">4</b>, rezultatul din ref.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Practic, inca nu imi trec testele cu checker-ul default (<a href="http://run_all.sh/run_test.sh" class="gmail_msg" target="_blank">run_all.sh/run_test.sh</a>); nu am incercat sa il modific, doar am creat bash-ul de mai sus, pentru testare (am pus pana la 13, pentru ca celelate teste imi trec cu checker-ul, deci pana aici ma interesau diferentele).</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Multumesc</div></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">2017-04-04 10:18 GMT+03:00 Razvan Crainea <span dir="ltr" class="gmail_msg"><<a href="mailto:razvan.crainea@gmail.com" class="gmail_msg" target="_blank">razvan.crainea@gmail.com</a>></span>:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Bună, Andreea!<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Definește, te rog, "output dubios". Ce anume obții?</div><div class="gmail_msg">De asemenea, ce anume ai modificat astfel încât să treacă toate testele până la testul 13?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Numai bine,</div><div class="gmail_msg">Răzvan<br class="gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="m_7635318343954197435h5 gmail_msg"><div dir="ltr" class="gmail_msg">On Mon, Apr 3, 2017 at 11:53 PM Andreea Metalbrain via so <<a href="mailto:so@cursuri.cs.pub.ro" class="gmail_msg" target="_blank">so@cursuri.cs.pub.ro</a>> wrote:<br class="gmail_msg"></div></div></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="m_7635318343954197435h5 gmail_msg"><div dir="ltr" class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Sunt Andreea Dobroteanu, 331CA (imi cer scuze, nu mi-am mai dat seama ca am avut alt nume pe contul de gmail).</div><div class="gmail_extra m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><div class="gmail_quote m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">2017-04-03 23:49 GMT+03:00 Andreea Metalbrain <span dir="ltr" class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><<a href="mailto:andreea.dobroteanu@gmail.com" class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg" target="_blank">andreea.dobroteanu@gmail.com</a>></span>:<br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><blockquote class="gmail_quote m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Buna, <div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Am o problema cu checker-ul: daca rulez testele cu ./run_all.sh (checker-ul), obtin un output dubios pentru testele 9, 10 si 13.</div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Insa daca rulez testele "de mana", output-ul este la fel cu cel din ref.</div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Am incercat sa fac un micut script (inspirat din functia execute_cmd din run_test.sh), sa rulez toate testele pana la 13, iar rezultatul este corect.</div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Am incarcat codul pe gitlab. (insa nu stiu cui ar trebui sa ii dau acces).</div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Nu reusesc deloc sa imi dau seama de unde poate aparea problema :(</div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Ma poate ajuta cineva?</div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div><div class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">Multumesc</div></div>
</blockquote></div><br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg"></div></div></div>
_______________________________________________<br class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg">
<a href="http://ocw.cs.pub.ro/courses/so/info/lista-discutii" rel="noreferrer" class="m_7635318343954197435m_-8357708465002089376gmail_msg gmail_msg" target="_blank">http://ocw.cs.pub.ro/courses/so/info/lista-discutii</a></blockquote></div></div></div>
</blockquote></div><br class="gmail_msg"></div>
</blockquote></div></div></div>